Class HeapSmall
HeapSmall class. Used to alloc and free small memory blocks on the heap.
Inheritance
System.Object
HeapSmall
Namespace: Cosmos.Core.Memory
Assembly: Cosmos.Core.dll
Syntax
public static class HeapSmall : object
Fields
| Improve this Doc View SourcemMaxItemSize
Max item size in the heap.
Declaration
public static System.UInt32 mMaxItemSize
Field Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceAlloc(System.UInt32)
Alloc memory block, of a given size.
Declaration
public static byte *Alloc(System.UInt32 aSize)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | aSize | A size of block to alloc, in bytes. |
Returns
Type | Description |
---|---|
System.Byte* | Byte pointer to the start of the block. |
Free(Void*)
Free block.
Declaration
public static void Free(void *aPtr)
Parameters
Type | Name | Description |
---|---|---|
System.Void* | aPtr | A pointer to the block. |
Init()
Init small heap.
Declaration
public static void Init()