Attempt to allocate a new heap slot for the given object.
- Parameters
-
h | Heap to allocate from |
heap_type | Define the size of objects that will be allocated on this heap |
size | Size of the requested object, in bytes |
obj | Object containing data that will be copied to the heap |
thd | Thread data for the mutator using this heap |
- Returns
- Pointer to the newly-allocated object, or
NULL
if allocation failed
This function will fail if there is no space on the heap for the requested object.