示例#1
0
        static GC()
        {
            Heap.InitFixedHeap();

            ExceptionMethods.State = ExceptionMethods.DefaultState = (ExceptionState *)Heap.AllocZeroed((uint)sizeof(ExceptionState), "GC()");

            Enabled = true;

            Heap.AccessLock            = new SpinLock();
            Heap.AccessLockInitialised = true;

            GC.state                       = new GCState();
            GC.state.AccessLock            = new SpinLock();
            GC.state.AccessLockInitialised = true;

            if ((uint)GC.state.CleanupList == 0xFFFFFFFF)
            {
                BasicConsole.WriteLine(" !!! PANIC !!! ");
                BasicConsole.WriteLine(" GC.state.CleanupList is 0xFFFFFFFF NOT null!");
                BasicConsole.WriteLine(" !-!-!-!-!-!-! ");
            }
        }
示例#2
0
文件: GC.cs 项目: sramos30/FlingOS
 public static void Load(GCState newState)
 {
     state = newState;
 }
示例#3
0
文件: GC.cs 项目: sramos30/FlingOS
        static GC()
        {
            Heap.InitFixedHeap();

            ExceptionMethods.State = ExceptionMethods.DefaultState = (ExceptionState*)Heap.AllocZeroed((uint)sizeof(ExceptionState), "GC()");

            Enabled = true;

            Heap.AccessLock = new SpinLock();
            Heap.AccessLockInitialised = true;

            GC.state = new GCState();
            GC.state.AccessLock = new SpinLock();
            GC.state.AccessLockInitialised = true;

            if ((uint)GC.state.CleanupList == 0xFFFFFFFF)
            {
                BasicConsole.WriteLine(" !!! PANIC !!! ");
                BasicConsole.WriteLine(" GC.state.CleanupList is 0xFFFFFFFF NOT null!");
                BasicConsole.WriteLine(" !-!-!-!-!-!-! ");
            }
        }
示例#4
0
 public static void Load(GCState newState)
 {
     state = newState;
 }