Beispiel #1
0
 public override void UpdateApp()
 {
     Kernel.canvas.DrawString("Available RAM                = " + GCImplementation.GetAvailableRAM() + "MB", Kernel.font, Kernel.BlackPen, (int)x, (int)y);
     Kernel.canvas.DrawString("Used RAM                     = " + GCImplementation.GetUsedRAM() + "B", Kernel.font, Kernel.BlackPen, (int)x, (int)(y + Kernel.font.Height));
     Kernel.canvas.DrawString("Small Allocated Object Count = " + HeapSmall.GetAllocatedObjectCount(), Kernel.font, Kernel.BlackPen, (int)x, (int)(y + 2 * Kernel.font.Height));
     Kernel.canvas.DrawString("Small Page Count             = " + RAT.GetPageCount(RAT.PageType.HeapSmall), Kernel.font, Kernel.BlackPen, (int)x, (int)(y + 3 * Kernel.font.Height));
     Kernel.canvas.DrawString("Medium Page Count            = " + RAT.GetPageCount(RAT.PageType.HeapMedium), Kernel.font, Kernel.BlackPen, (int)x, (int)(y + 4 * Kernel.font.Height));
     Kernel.canvas.DrawString("Large Page Count             = " + RAT.GetPageCount(RAT.PageType.HeapLarge), Kernel.font, Kernel.BlackPen, (int)x, (int)(y + 5 * Kernel.font.Height));
     Kernel.canvas.DrawString("RAT Page Count               = " + RAT.GetPageCount(RAT.PageType.RAT), Kernel.font, Kernel.BlackPen, (int)x, (int)(y + 6 * Kernel.font.Height));
     Kernel.canvas.DrawString("SMT Page Count               = " + RAT.GetPageCount(RAT.PageType.SMT), Kernel.font, Kernel.BlackPen, (int)x, (int)(y + 7 * Kernel.font.Height));
     Kernel.canvas.DrawString("GC Managed Page Count        = " + RAT.GetPageCount(RAT.PageType.SMT), Kernel.font, Kernel.BlackPen, (int)x, (int)(y + 8 * Kernel.font.Height));
     Kernel.canvas.DrawString("Free Count                   = " + Kernel.FreeCount, Kernel.font, Kernel.BlackPen, (int)x, (int)(y + 9 * Kernel.font.Height));
 }
Beispiel #2
0
 /// <summary>
 /// Get a rough estimate of used Memory by the System
 /// </summary>
 /// <returns>Returns the used PageSize by the MemoryManager in Bytes.</returns>
 public static uint GetUsedRAM()
 {
     return((RAT.TotalPageCount - RAT.GetPageCount(RAT.PageType.Empty)) * RAT.PageSize);
 }