Crate nstd_alloc
source · [−]Modules
Functions
Allocates a new memory block.
Parameters:
const NSTDUSize size
- Number of bytes to allocate.
Returns: NSTDAny 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: NSTDAny ptr
- The new memory block.
Deallocates a memory block.
Parameters:
NSTDAny *const ptr
- Pointer to the memory block.
const NSTDUSize size
- Number of bytes to deallocate.
Returns: NSTDInt32 errc
- Nonzero on error.
Reallocates a memory block.
Parameters:
NSTDAny *const 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: NSTDInt32 errc
- Nonzero on error.