Memalloc.h -
#include <Inventor/C/basic.h>
#include <stdarg.h>
typedef struct cc_memalloc cc_memalloc
typedef int cc_memalloc_strategy_cb (const int numunits_allocated)
cc_memalloc * cc_memalloc_construct (const unsigned int unitsize)
void cc_memalloc_destruct (cc_memalloc *allocator)
void * cc_memalloc_allocate (cc_memalloc *allocator)
void cc_memalloc_deallocate (cc_memalloc *allocator, void *ptr)
void cc_memalloc_clear (cc_memalloc *allocator)
void cc_memalloc_set_strategy (cc_memalloc *allocator, cc_memalloc_strategy_cb *cb)
Construct a memory allocator. Each allocated unit will be unitsize bytes.
Destruct allocator, freeing all memory used.
Allocate a memory unit from allocator.
Deallocate a memory unit. ptr must have been allocated using cc_memalloc_allocate(), of course.
Free all memory allocated by allocator.
Sets the allocator strategy callback. should be a function that returns the number of units to allocated in a block, based on the number of units currently allocated.
The default strategy is to just return the number of units allocated (which will successively double the internal memory chunk sizes), unless the number of units allocated is less than 64, then 64 is returned.
Generated automatically by Doxygen for Coin from the source code.