Contents

OSMalloc

Allocates a block of memory associated with a given Osmalloctag.

Declaration

void * OSMalloc(uint32_t size, OSMallocTag tag);

Parameters

  • size:

    The size of the memory block to allocate.

  • tag:

    The Osmalloctag under which to allocate the memory.

Return Value

A pointer to the memory on success, NULL on failure.

Discussion

If tag was created with the OSMT_PAGEABLE attribute and size is a full page or larger, the allocated memory is pageable; otherwise it is wired.

See Also

Memory