Class HeapLarge
HeapLarge class. Used to alloc and free large memory blocks on the heap.
Inheritance
System.Object
HeapLarge
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.Core.Memory
Assembly: Cosmos.Core.dll
Syntax
public static class HeapLarge
Fields
| Improve this Doc View SourcePrefixBytes
Prefix block. Used to store meta information.
Declaration
public const uint PrefixBytes = 16U
Field Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceAlloc(UInt32, RAT.PageType)
Alloc memory block, of a given size.
Declaration
public static byte *Alloc(uint aSize, RAT.PageType aType = RAT.PageType.HeapLarge)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | aSize | A size of block to alloc, in bytes. |
RAT.PageType | aType |
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. |
Exceptions
Type | Condition |
---|---|
System.Exception | Thrown if page type is not found. |
Init()
Init HeapLarge instance.
Declaration
public static void Init()
Remarks
Empty function