Class HeapMedium
HeapMedium class. Used to alloc and free medium memory blocks on the heap.
Inheritance
System.Object
    HeapMedium
  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 HeapMediumFields
| Improve this Doc View SourceMaxItemSize
Max item size in a page.
Declaration
public const uint MaxItemSize = 4080UField Value
| Type | Description | 
|---|---|
| System.UInt32 | 
PrefixBytes
Number of prefix bytes for the heap.
Declaration
public const uint PrefixBytes = 16UField Value
| Type | Description | 
|---|---|
| System.UInt32 | 
Methods
| Improve this Doc View SourceAlloc(UInt32)
Alloc memory block, of a given size.
Declaration
public static byte *Alloc(uint 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. | 
Exceptions
| Type | Condition | 
|---|---|
| System.Exception | Thrown if page type is not found. | 
Init()
Init HeapMedium instance.
Declaration
public static void Init()Remarks
Empty function