Functions | |
void | cx_memory_vtable_set (cx_memory_vtable *table) |
Install a new set of memory managmement functions. | |
cxptr | cx_malloc (cxsize nbytes) |
Allocate nbytes bytes. | |
cxptr | cx_malloc_clear (cxsize nbytes) |
Allocate nbytes bytes and clear them. | |
cxptr | cx_calloc (cxsize natoms, cxsize nbytes) |
Allocate memory for natoms elements of size size. | |
cxptr | cx_realloc (cxptr memory, cxsize nbytes) |
Change the size of a memory block. | |
void | cx_free (cxptr memory) |
Memory block deallocation. | |
cxbool | cx_memory_is_system_malloc (void) |
Check if the system's defaults are used for memory allocation. |
NULL
.
#include <cxmemory.h>
|
Allocate memory for natoms elements of size size.
|
|
Memory block deallocation.
|
|
Allocate nbytes bytes.
|
|
Allocate nbytes bytes and clear them.
|
|
Check if the system's defaults are used for memory allocation.
|
|
Install a new set of memory managmement functions.
|
|
Change the size of a memory block.
NULL the call to cx_realloc() is equivalent to cx_malloc(), and if nbytes is 0 the call is equivalent to cx_free(). Unless memory is NULL , it must have been returned by a previous call to cx_malloc(), cx_malloc_clear(), cx_calloc(), or cx_realloc().
|