Class HeapMedium
HeapMedium class. Used to alloc and free medium memory blocks on the heap.
Inheritance
System.Object
HeapMedium
Namespace: Cosmos.Core.Memory
Assembly: Cosmos.Core.dll
Syntax
public static class HeapMedium : object
Fields
| Improve this Doc View SourceMaxItemSize
Max item size in a page.
Declaration
public const System.UInt32 MaxItemSize = null
Field Value
Type | Description |
---|---|
System.UInt32 |
PrefixBytes
Number of prefix bytes for the heap.
Declaration
public const System.UInt32 PrefixBytes = null
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 HeapMedium instance.
Declaration
public static void Init()
Remarks
Empty function