Using Pools in Apache: Processing a Request
All the request processing hooks take the form
int my_func(request_rec* r) {
/* implement the request processing hook here */
}
This puts the request pool r->pool at your disposal. As discussed above,
the request pool is appropriate for the vast majority of operations
involved in processing a request. That's what you pass to Apache and APR
functions that need a pool argument, as well as your own.
The process pool is available as r->server->process->pool
for operations
that need to allocate long-lived resources; for example, cacheing a
resource that should be computed once and subsequently re-used in
other requests. The connection pool is r->connection->pool.