GME  13
Typedefs | Functions | Variables
Relocatable Memory Management Routines
APR Utility Functions
Collaboration diagram for Relocatable Memory Management Routines:

Typedefs

typedef struct 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

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

Fundamental allocation unit, within a specific apr_rmm_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

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

Parameters:
rmmThe relocatable memory block
lockAn apr_anylock_t of the appropriate type of lock, or NULL if no locking is required.
membufThe block of relocatable memory to be managed
memsizeThe size of relocatable memory block to be managed
contThe pool to use for local storage and management
Remarks:
Both
Parameters:
membufand
memsizemust be aligned (for instance using APR_ALIGN_DEFAULT).

Destroy a managed memory block.

Parameters:
rmmThe relocatable memory block to destroy

Attach to a relocatable memory block already managed by the apr_rmm API.

Parameters:
rmmThe relocatable memory block
lockAn apr_anylock_t of the appropriate type of lock
membufThe block of relocatable memory already under management
contThe pool to use for local storage and management

Detach from the managed block of memory.

Parameters:
rmmThe relocatable memory block to detach from

Free allocation returned by apr_rmm_malloc or apr_rmm_calloc.

Parameters:
rmmThe relocatable memory block
entityThe memory allocation to free

Allocate memory from the block of relocatable memory.

Parameters:
rmmThe relocatable memory block
reqsizeHow much memory to allocate

Realloc memory from the block of relocatable memory.

Parameters:
rmmThe relocatable memory block
entityThe memory allocation to realloc
reqsizeThe new size

Allocate memory from the block of relocatable memory and initialize it to zero.

Parameters:
rmmThe relocatable memory block
reqsizeHow much memory to allocate

Compute the offset of a relocatable allocation of memory

Parameters:
rmmThe relocatable memory block
entityThe physical address to convert to an offset

Compute the required overallocation of memory needed to fit n allocs

Parameters:
nThe number of alloc/calloc regions desired
APU_DECLARE ( void *  )

Retrieve the physical address of a relocatable allocation of memory

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

Variable Documentation

Definition at line 56 of file apr_rmm.h.

void * entity

Definition at line 95 of file apr_rmm.h.

Definition at line 56 of file apr_rmm.h.

Definition at line 56 of file apr_rmm.h.

apr_anylock_t void apr_size_t memsize

Definition at line 56 of file apr_rmm.h.

apr_size_t reqsize

Definition at line 87 of file apr_rmm.h.