AllocHeap

Top  Previous  Next

Syntax

UINT = AllocHeap(nSize as UINT)

Description

Used internally by string functions. Allocates memory from the programs heap.

Parameters

nSize - Number of bytes to allocate

Return value

A pointer stored as a UINT to the heap memory.

Remarks

This function should only be used by command implementers.

See Also: FreeHeap

Example usage

DEF p as POINTER
p = AllocHeap(100)
#<STRING>p = "Copied to heap memory"
PRINT #<STRING>p
FreeHeap(p)