Data Structures | |
| struct | apr_memnode_t |
Macros | |
| #define | APR_MEMNODE_T_SIZE APR_ALIGN_DEFAULT(sizeof(apr_memnode_t)) |
| #define | APR_ALLOCATOR_MAX_FREE_UNLIMITED 0 |
Typedefs | |
| typedef struct apr_allocator_t | apr_allocator_t |
| typedef struct apr_memnode_t | apr_memnode_t |
Functions | |
| APR_DECLARE (apr_status_t) apr_allocator_create(apr_allocator_t **allocator) | |
| APR_DECLARE (void) apr_allocator_destroy(apr_allocator_t *allocator) | |
| APR_DECLARE (apr_memnode_t *) apr_allocator_alloc(apr_allocator_t *allocator | |
| APR_DECLARE (apr_size_t) apr_allocator_align(apr_allocator_t *allocator | |
| APR_DECLARE (apr_pool_t *) apr_allocator_owner_get(apr_allocator_t *allocator) | |
Variables | |
| apr_size_t | size |
| apr_memnode_t * | memnode |
| apr_pool_t * | pool |
| #define APR_ALLOCATOR_MAX_FREE_UNLIMITED 0 |
Symbolic constants
| #define APR_MEMNODE_T_SIZE APR_ALIGN_DEFAULT(sizeof(apr_memnode_t)) |
The base size of a memory node - aligned.
| typedef struct apr_allocator_t apr_allocator_t |
the allocator structure
| typedef struct apr_memnode_t apr_memnode_t |
the structure which holds information about the allocation
| APR_DECLARE | ( | apr_memnode_t * | ) |
Allocate a block of mem from the allocator
| allocator | The allocator to allocate from |
| size | The size of the mem to allocate (excluding the memnode structure) |
| APR_DECLARE | ( | apr_pool_t * | ) |
Get the current owner of the allocator
| allocator | The allocator to get the owner from |
| APR_DECLARE | ( | apr_size_t | ) |
Get the true size that would be allocated for the given size (including the header and alignment).
| allocator | The allocator from which to the memory would be allocated |
| size | The size to align |
| APR_DECLARE | ( | apr_status_t | ) |
Create a new allocator
| allocator | The allocator we have just created. |
| APR_DECLARE | ( | void | ) |
Destroy an allocator
| allocator | The allocator to be destroyed |
Free a list of blocks of mem, giving them back to the allocator. The list is typically terminated by a memnode with its next field set to NULL.
| allocator | The allocator to give the mem back to |
| memnode | The memory node to return |
Set the owner of the allocator
| allocator | The allocator to set the owner for |
| pool | The pool that is to own the allocator |
Set the current threshold at which the allocator should start giving blocks back to the system.
| allocator | The allocator to set the threshold on |
| size | The threshold. 0 == unlimited. |