Relocatable Memory Management Routines


型定義

typedef apr_rmm_t apr_rmm_t
typedef apr_size_t apr_rmm_off_t

関数

apr_status_t apr_rmm_init (apr_rmm_t **rmm, apr_anylock_t *lock, void *membuf, apr_size_t memsize, apr_pool_t *cont)
apr_status_t apr_rmm_destroy (apr_rmm_t *rmm)
apr_status_t apr_rmm_attach (apr_rmm_t **rmm, apr_anylock_t *lock, void *membuf, apr_pool_t *cont)
apr_status_t apr_rmm_detach (apr_rmm_t *rmm)
apr_rmm_off_t apr_rmm_malloc (apr_rmm_t *rmm, apr_size_t reqsize)
apr_rmm_off_t apr_rmm_realloc (apr_rmm_t *rmm, void *entity, apr_size_t reqsize)
apr_rmm_off_t apr_rmm_calloc (apr_rmm_t *rmm, apr_size_t reqsize)
apr_status_t apr_rmm_free (apr_rmm_t *rmm, apr_rmm_off_t entity)
void * apr_rmm_addr_get (apr_rmm_t *rmm, apr_rmm_off_t entity)
apr_rmm_off_t apr_rmm_offset_get (apr_rmm_t *rmm, void *entity)
apr_size_t apr_rmm_overhead_get (int n)

型定義

typedef apr_size_t apr_rmm_off_t

Fundamental allocation unit, within a specific apr_rmm_t

typedef struct apr_rmm_t apr_rmm_t

Structure to access Relocatable, Managed Memory


関数

void* apr_rmm_addr_get ( apr_rmm_t rmm,
apr_rmm_off_t  entity 
)

Retrieve the physical address of a relocatable allocation of memory

引数:
rmm The relocatable memory block
entity The memory allocation to free
戻り値:
address The address, aligned with APR_ALIGN_DEFAULT.

apr_status_t apr_rmm_attach ( apr_rmm_t **  rmm,
apr_anylock_t lock,
void *  membuf,
apr_pool_t cont 
)

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

引数:
rmm The relocatable memory block
lock An apr_anylock_t of the appropriate type of lock
membuf The block of relocatable memory already under management
cont The pool to use for local storage and management

apr_rmm_off_t apr_rmm_calloc ( apr_rmm_t rmm,
apr_size_t  reqsize 
)

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

引数:
rmm The relocatable memory block
reqsize How much memory to allocate

apr_status_t apr_rmm_destroy ( apr_rmm_t rmm  ) 

Destroy a managed memory block.

引数:
rmm The relocatable memory block to destroy

apr_status_t apr_rmm_detach ( apr_rmm_t rmm  ) 

Detach from the managed block of memory.

引数:
rmm The relocatable memory block to detach from

apr_status_t apr_rmm_free ( apr_rmm_t rmm,
apr_rmm_off_t  entity 
)

Free allocation returned by apr_rmm_malloc or apr_rmm_calloc.

引数:
rmm The relocatable memory block
entity The memory allocation to free

apr_status_t apr_rmm_init ( apr_rmm_t **  rmm,
apr_anylock_t lock,
void *  membuf,
apr_size_t  memsize,
apr_pool_t cont 
)

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

引数:
rmm The relocatable memory block
lock An apr_anylock_t of the appropriate type of lock, or NULL if no locking is required.
membuf The block of relocatable memory to be managed
memsize The size of relocatable memory block to be managed
cont The pool to use for local storage and management
意見:
Both
引数:
membuf and
memsize must be aligned (for instance using APR_ALIGN_DEFAULT).

apr_rmm_off_t apr_rmm_malloc ( apr_rmm_t rmm,
apr_size_t  reqsize 
)

Allocate memory from the block of relocatable memory.

引数:
rmm The relocatable memory block
reqsize How much memory to allocate

apr_rmm_off_t apr_rmm_offset_get ( apr_rmm_t rmm,
void *  entity 
)

Compute the offset of a relocatable allocation of memory

引数:
rmm The relocatable memory block
entity The physical address to convert to an offset

apr_size_t apr_rmm_overhead_get ( int  n  ) 

Compute the required overallocation of memory needed to fit n allocs

引数:
n The number of alloc/calloc regions desired

apr_rmm_off_t apr_rmm_realloc ( apr_rmm_t rmm,
void *  entity,
apr_size_t  reqsize 
)

Realloc memory from the block of relocatable memory.

引数:
rmm The relocatable memory block
entity The memory allocation to realloc
reqsize The new size


Apacheに対してSun Jul 19 22:05:32 2009に生成されました。  doxygen 1.4.7