This function returns a memory block of the size requested, or NULL if the allocation failed. The memory will satisfy the requirements of MEMF_PUBLIC | MEMF_CLEAR. As expected by AmigaDOS, the total size of the memory block is stored at (memblock - 4), so the actual memory allocated will always be four bytes larger than size_in_bytes.
INPUTS
size_in_bytes
the size of the desired block in bytes.
RESULT
memBlock - a pointer to the allocated free block. This block will be longword aligned, and the total size of the block is stored at (memblock - 4). If the allocation failed, memBlock will return zero. ADDITIONAL CONSIDERATIONS The value returned by DosAllocMem is a real pointer. If you need a BPTR, you must convert this value yourself.