Class GCImplementation
GCImplementation class. Garbage collector. Mostly not implemented.
Inheritance
Inherited Members
Namespace: Cosmos.Core
Assembly: Cosmos.Core.dll
Syntax
public static class GCImplementation
Remarks
Most of the class is yet to be implemented.
Methods
| Improve this Doc View SourceAllocNewObject(UInt32)
Alloc new object.
Declaration
public static uint AllocNewObject(uint aSize)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | aSize |
Returns
Type | Description |
---|---|
System.UInt32 |
DecRootCount(UInt16*)
Decrements the root count of the object at the pointer by 1
Declaration
public static void DecRootCount(ushort *aPtr)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16* | aPtr |
DecRootCountsInStruct(UInt16*, UInt32)
Decrements the root count of all object stored in this struct by 1
Declaration
public static void DecRootCountsInStruct(ushort *aPtr, uint aType)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16* | aPtr | |
System.UInt32 | aType | Type of the struct |
Free(Object)
Free Object from Memory
Declaration
public static void Free(object aObj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | aObj |
GetAvailableRAM()
Get amount of available Ram
Declaration
public static ulong GetAvailableRAM()
Returns
Type | Description |
---|---|
System.UInt64 | Returns amount of available memory to the System in MB |
GetPointer(Object)
Get the Pointer of any object needed for Free()
Declaration
public static uint *GetPointer(object aObj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | aObj |
Returns
Type | Description |
---|---|
System.UInt32* | Returns a pointer to the area in memory where the object is located |
GetSafePointer(Object)
Get the pointer of any object as a uint
Declaration
public static uint GetSafePointer(object aObj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | aObj |
Returns
Type | Description |
---|---|
System.UInt32 |
GetType(Object)
Get cosmos internal type from object
Declaration
public static uint GetType(object aObj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | aObj |
Returns
Type | Description |
---|---|
System.UInt32 |
GetUsedRAM()
Get a rough estimate of used Memory by the System
Declaration
public static uint GetUsedRAM()
Returns
Type | Description |
---|---|
System.UInt32 | Returns the used PageSize by the MemoryManager in Bytes. |
IncRootCount(UInt16*)
Increments the root count of the object at the pointer by 1
Declaration
public static void IncRootCount(ushort *aPtr)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16* | aPtr |
IncRootCountsInStruct(UInt16*, UInt32)
Increments the root count of all object stored in this struct by 1
Declaration
public static void IncRootCountsInStruct(ushort *aPtr, uint aType)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16* | aPtr | |
System.UInt32 | aType | Type of the struct |
Init()
Initialise the Memory Manager, this should not be called anymore since it is done very early during the boot process.
Declaration
public static void Init()