public Process() { Threads = new KList <Thread>(1); GlobalAllocations = new KList <GlobalAllocation>(); //StdIn = new FifoQueue<byte>(256); CurrentBrk = 0; }
public static void Tests() { var ar = new KList <uint>(); ar.Add(44); ar.Add(55); KernelMessage.WriteLine("CNT: {0}", ManagedMemoy.AllocationCount); foreach (var num in ar) { KernelMessage.WriteLine("VAL: {0}", num); } KernelMessage.WriteLine("CNT: {0}", ManagedMemoy.AllocationCount); ar.Destroy(); KernelMessage.WriteLine("Phys Pages free: {0}", PhysicalPageManager.FreePages); for (var i = 0; i < 10000; i++) { var s = new int[] { 1, 2, 3, 4, }; s[1] = 5; Memory.FreeObject(s); } KernelMessage.WriteLine("Phys Pages free: {0}", PhysicalPageManager.FreePages); //Memory.FreeObject(s); }
public KVPList GetValues(KList keys) { // Returning the KVPList on the basis of the given KList if (_persistSource != null) { return(_persistSource.LoadValues(keys)); } return(null); // Returning null if PersistSource is null }
public static void RefreshList() { KList.Clear(); DataTable dt = Database.GetAllData("Kart"); foreach (DataRow dataRow in dt.Rows) { KList.Add(new Kart( dataRow["Kart"].ToString(), Convert.ToBoolean(dataRow["Available"]), dataRow["Trans_Id"].ToString())); } }
protected override void AddComponent(GameObject go) { KList list = null; if (HasParam(PARAM_PAGEABLE) == true) { list = go.AddComponent <KListPageable>(); } else { list = go.AddComponent <KList>(); } //list.ItemBuilder = _itemBuilder; //不采用这方案 }
public static void Setup(ThreadStart followupTask) { ProcessList = new KList <Process>(); Idle = CreateEmptyProcess(new ProcessCreateOptions()); Idle.Path = "/system/idle"; Idle.RunState = ProcessRunState.Running; System = CreateEmptyProcess(new ProcessCreateOptions()); System.Path = "/system/main"; System.RunState = ProcessRunState.Running; Scheduler.Setup(followupTask); Scheduler.Start(); Panic.Error("Should never get here"); }
/// <summary> /// Setup the <see cref="Scheduler"/> and <see cref="ProcessManager"/> /// </summary> /// <param name="followupTask">After enabling Scheduling, the Kernel will continue with this task.</param> public static void Setup(ThreadStart followupTask) { ProcessList = new KList <Process>(); // Create idle task Idle = CreateEmptyProcess(new ProcessCreateOptions()); Idle.Path = "/system/idle"; Idle.RunState = ProcessRunState.Running; // Create system task System = CreateEmptyProcess(new ProcessCreateOptions()); System.Path = "/system/main"; System.RunState = ProcessRunState.Running; // Initialize scheduler Scheduler.Setup(followupTask); Scheduler.Start(); // If we ever get here, Scheduler as not able to switch to followupTask. Panic.Error("Should never get here"); }
public KVPList GetValues(App app, User user, KList keys) { throw new NotImplementedException(); }