Changes the size of an allocated memory block.
#include <nks/memory.h> void *NXMemRealloc ( void *old, size_t newSize, size_t alignment);
(IN) Points to the original block of memory.
(IN) Specifies the total size of the memory to be reallocated.
(IN) Specifies the alignment requirements, if any. Zero indicates a default alignment. If a nonzero alignment value is specified, it must be a power of two. If an illegal alignment is specified, the alignment reverts to default alignment.
If successful, returns a pointer to the block of allocated memory; otherwise returns NULL.
If the original block was larger than the new requested size, the same block might be returned. If a smaller size block is returned, as much data as possible from the old block is preserved.
If the request requires a new allocation, the data held in the original block is transferred into the newly allocated block. The unused bytes are not zero filled.