[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Allocate new memory on the heap
Source position: line 0
procedure Getmem( |
out p: pointer; |
Size: PtrUInt |
); |
size: PtrUInt |
):pointer; |
Getmem reserves Size bytes memory on the heap, and returns a pointer to this memory in p. What happens if no more memory is available, depends on the value of the variable ReturnNilIfGrowHeapfails: if the variable is True then Nil is returned. If the variable is False, a run-time error is generated. The default value is False, so by default an error is generated.
For an example, see Freemem.
None.
|
Release allocated memory |
|
|
Free dynamically allocated memory |
|
|
Dynamically allocate memory for variable |
|
|
Describe behaviour if getmem fails. |