Function Memory.freeMem
freeMem -- Free byteSize byte sof memory at memoryBlock.
void freeMem
(
void* memoryBlock,
ulong byteSize
);
Free a region of memory, returning it to the system pool from which it came. Freeing partial blocks back into the system pool is unwise.
Parameters
Name | Description |
---|---|
memoryBlock | pointer to the memory block to free |
byteSize | the size of the desired block in bytes. (The operating system will automatically round this number to a multiple of the system memory chunk size) |
Returns
none
Notes
If a block of memory is freed twice, the system will Guru. The Alert is SEN_FreeTwice. If you pass the wrong pointer, you will probably see SEN_MemCorrupt. Future versions may add more sanity checks to the memory lists.
See
AllocMem(), AllocAbs(), AllocAligned()