This function will attempt to allocate a new chunk of memory for the new size, and if successful, will copy the contents of the memory from the old location to the new location. The memory address passed in must be a value previously returned from one of the allocation commands within this plug-in.
If the new size is smaller than the original size, only the safe amount of data will be copied across to the new memory.
If the command fails to allocate a new chunk of memory, the original memory will be left intact and a new memory address of 0 will be returned.
If an address of 0 is passed to the function, it will operate as if you had called the ALLOC function. |