Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

Relocatable Memory Management Routines


Typedefs

typedef apr_rmm_t apr_rmm_t
typedef apr_size_t apr_rmm_off_t

Functions

 APU_DECLARE (apr_status_t) apr_rmm_init(apr_rmm_t **rmm
 APU_DECLARE (apr_rmm_off_t) apr_rmm_malloc(apr_rmm_t *rmm
 APU_DECLARE (void *) apr_rmm_addr_get(apr_rmm_t *rmm
 APU_DECLARE (apr_size_t) apr_rmm_overhead_get(int n)

Variables

apr_anylock_tlock
apr_anylock_t void * membuf
apr_anylock_t void apr_size_t memsize
apr_anylock_t void apr_size_t
apr_pool_t
cont
apr_size_t reqsize
void * entity

Typedef Documentation

typedef apr_size_t apr_rmm_off_t
 

Fundemental allocation unit, within a spcific apr_rmm_off_t

Definition at line 43 of file apr_rmm.h.

typedef struct apr_rmm_t apr_rmm_t
 

Structure to access Relocatable, Managed Memory

Definition at line 40 of file apr_rmm.h.


Function Documentation

APU_DECLARE apr_size_t   ) 
 

Compute the required overallocation of memory needed to fit n allocs

Parameters:
n The number of alloc/calloc regions desired

Definition at line 411 of file apr_rmm.c.

APU_DECLARE void *   ) 
 

Retrieve the physical address of a relocatable allocation of memory

Parameters:
rmm The relocatable memory block
entity The memory allocation to free
Returns:
address The address, aligned with APR_ALIGN_DEFAULT.

APU_DECLARE apr_rmm_off_t   ) 
 

Allocate memory from the block of relocatable memory.

Parameters:
rmm The relocatable memory block
reqsize How much memory to allocate

Definition at line 297 of file apr_rmm.c.

References APR_ALIGN_DEFAULT, APR_ANYLOCK_LOCK, APR_ANYLOCK_UNLOCK, find_block_of_size(), move_block(), and RMM_BLOCK_SIZE.

Here is the call graph for this function:

APU_DECLARE apr_status_t   ) 
 

Initialize a relocatable memory block to be managed by the apr_rmm API.

Parameters:
rmm The relocatable memory block
lock An apr_anylock_t of the appropriate type of lock
membuf The block of relocateable memory to be managed
memsize The size of relocateable memory block to be managed
cont The pool to use for local storage and management
Remarks:
Both
Parameters:
membuf and
memsize must be aligned (for instance using APR_ALIGN_DEFAULT).

Definition at line 37 of file apr_brigade.c.


Variable Documentation

apr_anylock_t void apr_pool_t* cont
 

Definition at line 72 of file apr_rmm.h.

void * entity
 

Definition at line 123 of file apr_rmm.h.

Referenced by appendAttributeValue(), doContent(), doProlog(), and storeEntityValue().

apr_anylock_t * lock
 

Definition at line 72 of file apr_rmm.h.

apr_anylock_t void * membuf
 

Definition at line 72 of file apr_rmm.h.

apr_anylock_t void apr_size_t memsize
 

Definition at line 55 of file apr_rmm.h.

apr_size_t reqsize
 

Definition at line 101 of file apr_rmm.h.