Home  /  Autodocs  /  exec.library

NAME

AllocVec
allocate memory and keep track of the size (V36)

SYNOPSIS

memoryBlock = AllocVec(byteSize, attributes)
D0 D0 D1

void *AllocVec(ULONG, ULONG);

FUNCTION

This function works identically to AllocMem(), but tracks the size of the allocation.

See the AllocMem() documentation for details.

WARNING

The result of any memory allocation MUST be checked, and a viable error handling path taken. ANY allocation may fail if memory has been filled.

Memory allocation and deallocation as well as querying how much memory is available requires a Task or, by extension, a Process. None of the exec kernel memory management operations is safe to call from interrupt code!

SEE ALSO

FreeVec(), AllocMem()