| External Interfaces/API Reference | ![]() |
C Syntax
#include "matrix.h" #include <stdlib.h> void *mxRealloc(void *ptr, size_t size);
Arguments
ptr
Pointer to a block of memory allocated by mxCalloc, or by a previous call to mxRealloc.
size
Description
mxRealloc reallocates the memory routine for the managed list. If mxRealloc fails to allocate a block, you must free the block since the ANSI definition of realloc states that the block remains allocated. mxRealloc returns NULL in this case, and in subsequent calls to mxRealloc of the form:
x = mxRealloc(x, size);
Example
See mxsetnzmax.c in the mx subdirectory of the examples directory.
See Also
mxCalloc, mxFree, mxMalloc, mxSetAllocFcns
| mxMalloc | mxRemoveField | ![]() |