ReAlloc

See Also: Memory Management Functions

Purpose

Changes the size of a block of memory.

Return Type

Pointer

Syntax

Realloc( {aPointer}, {iNewSize} )

Where:

What It Does

ReAlloc changes the size of the given memory block, aPointer, reallocating it to the size specified in iNewSize. The return value is either a pointer to a valid memory address (meaning it worked) or 0, in case of failure.

Example

Move (Realloc(pMemory, 10000)) to pNewMemoryBlock

If (pNewMemoryBlock <> 0) ...