Crate nstd_alloc[−][src]
Structs
Represents a heap allocated object.
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.
Frees a heap allocated object.
Parameters:
NSTDHeap *const obj - The heap allocated object.
Returns: int errc - Nonzero on error.
Creates a new heap allocated object.
Parameters:
const NSTDPointer *const ptr - Pointer to an object to be copied to the heap.
Returns: NSTDHeap obj - The new heap allocated object.
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.
