Function
Changes the size of a previously allocated block of storage.
Syntax
#include <dx/dx.h>
Pointer DXReAllocate(Pointer x, unsigned int n)
Functional Details
Changes the size of the previously allocated block of storage pointed to by x by n bytes. The pointer x must have been returned from either DXAllocate, DXAllocateZero, DXAllocateLocal, DXAllocateLocalZero, or a previous call to DXReAllocate. If x is NULL, a global memory block is allocated as if DXAllocate was called. The number of bytes n must be greater than 0. The user is responsible for freeing the allocated space by calling DXFree. The block is copied if necessary, invalidating any pointers to the old storage.
Return Value
Returns a pointer to the new block, or returns NULL and sets the error code to indicate an error such as out of memory or a corrupted storage area.
See Also
DXAllocate, DXAllocateZero, DXAllocateLocal, DXAllocateLocalZero, DXAllocateLocalOnly, DXAllocateLocalOnlyZero, DXFree, DXPrintAlloc