Ignore:
Timestamp:
Dec 6, 2007, 3:36:02 PM (16 years ago)
Author:
rryu
Message:

メモリを2GB以上使っている場合でもステータスウインドウの表示がおかしくならないようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MacFaceFloat/StatusWindow.cs

    r91 r98  
    129129                        int fh = memoryGraph.Height;
    130130
    131                         int totalMemory = (int)memStats.TotalVisibleMemorySize * 1024;
     131            ulong totalMemory = (ulong)memStats.TotalVisibleMemorySize * 1024;
    132132                        double rate = (double)fh / (totalMemory * 1.5);
    133                         int border = (int)(totalMemory * rate);
     133            int border = (int)(totalMemory * rate);
    134134
    135135                        g.FillRectangle(new SolidBrush(Color.White), 0, 0, fw, fh);
     
    160160                                int h = 0;
    161161
    162                                 long kernelTotal = usage.KernelNonPaged + usage.KernelPaged + usage.DriverTotal + usage.SystemCodeTotal;
     162                                UInt64 kernelTotal = usage.KernelNonPaged + usage.KernelPaged + usage.DriverTotal + usage.SystemCodeTotal;
    163163                                h = (int)((kernelTotal) * rate);
    164164                                y -= h;
     
    169169                                g.FillRectangle(systemCacheBrush, x, y, w, h);
    170170
    171                                 h = (int)(usage.Committed * rate);
     171                h = (int)((usage.Committed - kernelTotal) * rate);
    172172                                y -= h;
    173173                                g.FillRectangle(commitedBrush, x, y, w, h);
Note: See TracChangeset for help on using the changeset viewer.