(C) 1998 AROS - The Amiga Research OS


NAME

void * DosAllocMem (size_in_bytes)

LOCATION
In ArpBase at offset 57

SYNOPSIS
ULONG size_in_bytes

FUNCTION
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.

EXAMPLE
SEE ALSO
DosFreeMem()

NOTES

BUGS
None known.

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
28.03.1998 bergers
Some new functions.