HM_realloc()
Reallocates a block of memory.
Syntax
void * HM_realloc(void * ptr, int size);
Type
HyperMesh hmlib Function
Description
Inputs
- ptr
- The block of memory to be resized.
- size
- The desired size of the block.
Example
If successful, HM_realloc() returns a pointer to the resized block of memory. If unsuccessful, HM_realloc() calls HM_terminate() with an appropriate error message, and program execution is terminated.
If *ptr is NULL, HM_realloc() behaves as HM_malloc().
Errors
None.