Allocate memory on the heap for an object.
- Parameters
-
hrt | The root of the heap to allocate from |
size | Size of the object to allocate |
obj | Object containing data to copy to the heap |
thd | The requesting mutator's thread data object |
heap_grown | Pointer to an "out" parameter that will be set to 1 if the heap is grown in size. |
- Returns
- Pointer to the heap object
This function will attempt to grow the heap if it is full, and will terminate the program if the OS is out of memory.