Dynamic Memory Allocation Routines
Go Up to API Categories Index
This topic lists all dynamic memory management routines. These functions are platform independent.
Routine | Description | Type |
---|---|---|
System.AllocMem allocates a memory block and initializes each byte to zero. |
Standard function. | |
Releases memory allocated for a dynamic variable. |
Compiler Built-in. System._Dispose or System._FreeMem is called. | |
Uninitializes a dynamically allocated variable. |
Compiler Built-in. | |
System.FreeMem frees a memory block. |
Compiler Built-in. System._FreeMem is called. | |
System.FreeMemory frees a memory block. |
Standard function. | |
System.GetMem allocates a memory block. |
Compiler Built-in. System._GetMem is called. | |
System.GetMemory allocates a memory block. |
Standard function. | |
System.Initializes a dynamically allocated variable. |
Compiler Built-in. System._Initialize, System._InitializeArray or System._InitializeRecord is called. | |
Creates a new dynamic variable and sets P to point to it. |
Compiler Built-in. System._GetMem or System_New is called. | |
System.ReallocMem reallocates a memory block. |
Compiler Built-in. System._ReallocMem is called. | |
System.ReallocMemory resizes a memory block. |
Standard function. |
FreeMem procedure
procedure FreeMem(var P: Pointer; [ Size: Integer]);
This procedure is a Delphi-built-in function, not defined in System.pas. The procedure has two overloaded forms:
procedure FreeMem(var P: Pointer); overload;
procedure FreeMem(var P: Pointer; Size: NativeInt); overload;
Delphi compiler still allows using second form with Size
parameter, but the current RTL doesn't use Size
parameter to validate memory block.