NDSummary.OnToolTipsLoaded("File:memory.h",{997:"
u16 Mem_GetStackAddress()
Get the current address of the stack top (lower address).
",998:"
inline u16 Mem_GetHeapAddress()
Get the current address of the heap top (higher address).
",999:"
inline u16 Mem_GetHeapSize()
Get the amount of free space in the heap.
",1000:"
void* Mem_HeapAlloc(
u16 size
)
Alloc a part of the heap.
",1001:"
void Mem_HeapFree(
u16 size
)
Free the last allocated area of the heap.
",1003:"
void Mem_Copy(
const voidsrc,
voiddest,
u16 size
)
Copy a memory block from a source address to another (minimal size of 1 byte).
",1004:"
inline void Mem_Copy_16b(
const voidsrc,
voiddest,
u16 size
)
Copy a 16-bits memory block from a source address to another (minimal size of 1 word / 2 byte).
",1005:"
void Mem_FastCopy(
const voidsrc,
voiddest,
u16 size
)
Fast copy a memory block from a source address to a destination.  Use 16 unrolled-LDI loop.
",1006:"
inline void Mem_FastCopy_16b(
const voidsrc,
voiddest,
u16 size
)
Fast copy a 16-bits memory block from a source address to a destination.  Use 16 unrolled-LDI loop.
",1007:"
void Mem_Set(
u8 val,
voiddest,
u16 size
)
Fill a memory block with a given 8-bits value (minimal size of 2 bytes).
",1008:"
void Mem_Set_16b(
u16 val,
voiddest,
u16 size
)
Fill a memory block with a given 16-bits value (minimal size of 2 bytes).
",1009:"
void Mem_FastSet(
u8 val,
voiddest,
u16 size
)
Fast fill a memory chunk with a given value (minimal size of 2 bytes).  Use 16 unrolled-LDI loop.
",1011:"
void Mem_DynamicInitialize(
voidbase,
u16 size
)
Allocates a static memory chunk which can then be used to allocate chunks dynamically.  Memory chunk can be in any pages but: - The memory space have to be continuous from a Z80 perspective.  - You have to ensure that all memory segments are selected in their proper place when allocating or releasing memory.
",1012:"
inline void Mem_DynamicInitializeHeap(
u16 size
)
Allocates a static memory chunk in the heap which can then be used to allocate chunks dynamically.
",1013:"
void* Mem_DynamicAlloc(
u16 size
)
Allocate a memory chunk from the dynamic memory buffer
",1014:"
void Mem_DynamicFree(
voidptr
)
Free a memory chunk from the dynamic memory buffer
",1015:"
inline u16 Mem_GetDynamicSize(
voidptr
)
Get the size of a dynamically allocated memory chunk
"});