Allocate a block of memory.
Storage is dynamically allocated from the available system memory. The block is not initialized and may contain arbitrary data.
- Resource Management:
- This function allocates resources that must later be freed by calling PCRMem_Free.
- Note
- If PCRMem_Realloc is used on a value returned from this function, then the value returned from PCRMem_Realloc is the only one that needs to be freed.
- Parameters
-
size | The total amount of memory to allocate. This must be greater than 0. |
- Returns
- The pointer to the newly allocated memory, or NULL if the allocation failed.
- See Also
- PCRMem_Free