Crate nstd_alloc[−][src]
Functions
Allocates a new memory block.
Parameters:
const NSTDUSize size - Number of bytes to allocate.
Returns: NSTDByte *ptr - The new memory block.
Allocates a new memory block with all bytes set to 0.
Parameters:
const NSTDUSize size - Number of bytes to allocate.
Returns: NSTDByte *ptr - The new memory block.
Deallocates a memory block.
Parameters:
NSTDByte **ptr - Pointer to the memory block.
const NSTDUSize size - Number of bytes to deallocate.
Returns: int errc - Nonzero on error.
Reallocates a memory block.
Parameters:
NSTDByte **ptr - Pointer to the memory block.
const NSTDUSize size - The current size of the memory block.
const NSTDUSize new_size - The new size of the memory block.
Returns: int errc - Nonzero on error.