Definition: atom a = allocate(integer i, bool cleanup=false)
Description: Allocate i contiguous bytes of memory. Return the address of the block of memory, or return 0 if the memory cannot be allocated. The address returned will be at least 4-byte aligned.
Comments: If the optional cleanup flag is non-zero, the memory will be automatically released once it is no longer required, otherwise the application should invoke free() manually.
buffer = allocate(100)
-- (mem_set(buffer,0,100) could be used instead of the following)
for i=0 to 99 do
    poke(buffer+i, 0)
end for
Implementation: Partly in builtins\pAlloc.e (an autoinclude), but mainly via :%pAlloc in builtins\VM\pHeap.e (also an autoinclude) - be warned however it is low-level complicated stuff that you do not need to know.
See Also: free, mem_set, peek, poke, call, delete_routine