Apache 1.3 API Documentation

Structure ap_pool

Definition:

typedef struct pool pool;
typedef struct pool ap_pool;
struct pool opaque-structure
     

Usage example:

No examples available.
     

Memory pool allocation routines in Apache are designed so that developers don't have to keep track of every allocation so that it can be explicitly freed later.

Instead, Apache uses memory pools, and items (both memory and I/O handlers) are allocated from them. Currently there are two long-term pools; one for per-transaction info (request_rec and conn_rec structures and such), and one for config info (server_rec structures, et alia). When a transaction is over, Apache can delete everything in the per-transaction pool without fear, and without thinking too hard about it either.

There are two reasons a pool can be destroyed:

  1. The server has finished with that pool, or
  2. The server has forked and is preparing to exec another program.
See also:
ap_bytes_in_pool, ap_clear_pool, ap_destroy_pool, ap_find_pool, ap_make_sub_pool, ap_palloc, ap_pcalloc, ap_pclosedir, ap_pclosef, ap_pclosesocket, ap_pduphostent, ap_pfclose, ap_pfdopen, ap_pfopen, ap_pgethostbyname, ap_pool_is_ancestor, ap_pool_join, ap_popendir, ap_popenf, ap_pregcomp, ap_pregfree, ap_psocket, ap_pstrcat, ap_pstrdup, ap_pstrndup, pool

Previous: AP_MD5_CTX Next: ap_vformatter_buff

Table of Contents (Routines, Structures, Data Cells, Constants)