OSMalloc_noblock
Allocates a block of memory associated with a given Osmalloctag, returning NULL if it would block.
Declaration
void * OSMalloc_noblock(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 or if allocation would block.
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.
This function is guaranteed not to block.