Previous: , Up: allocators   [Contents][Index]


3.2 Programming interface

Function: void * ccmem_malloc (cce_destination_t L, ccmem_allocator_t const * const A, size_t size)

Allocate memory in a way similar to the standard malloc(), using the allocator A. If an error occurs: an exception is raised by jumping to the location L. This function never returns NULL.

Function: void * ccmem_realloc (cce_destination_t L, ccmem_allocator_t const * const A, void * ptr, size_t newsize)

Reallocate memory in a way similar to the standard realloc(), using the allocator A. If an error occurs: an exception is raised by jumping to the location L. This function never returns NULL. Only blocks of memory allocated using A can be reallocated using A.

Function: void * ccmem_calloc (cce_destination_t L, ccmem_allocator_t const * const A, size_t count, size_t eltsize)

Allocate memory in a way similar to the standard calloc(), using the allocator A. If an error occurs: an exception is raised by jumping to the location L. This function never returns NULL.

Function: void ccmem_free (ccmem_allocator_t const * const A, void * ptr)

Release memory in a way similar to the standard free(), using the allocator A.


Previous: , Up: allocators   [Contents][Index]

This document describes version 0.2.2-devel.3 of CCMemory.