Matrix1 Utility Plug-ins

REALLOC ZEROED


Syntax

MemoryAddress = REALLOC ZEROED( MemoryAddress, NewSize )

Description

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 larger than the original size, the extra bytes will be filled with byte values of 0.

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 ZEROED function.

Go back to ...

Matrix1Util_04 Commands Menu
Matrix1 Utils Main Index
Matrix1 Utils Command List
Commands Menu
Main Menu

Copyright © Ian Mold - Matrix1 Software 2006 - 2011