External Interfaces Reference Previous page   Next Page
mxRealloc

Reallocate memory

C Syntax

Arguments

ptr
   Pointer to a block of memory allocated by mxCalloc, or by a previous call to mxRealloc.

size
   New size of allocated memory, in bytes.

Returns

A pointer to the reallocated block of memory on success, and 0 on failure.

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:

Examples

See mxsetnzmax.c in the mx subdirectory of the examples directory.

See Also

mxCalloc, mxFree, mxMalloc


Previous page  mxMalloc mxRemoveField Next page

© 1994-2005 The MathWorks, Inc.