diff --git a/2.x/trunk/ProcessHacker/ProcessHacker.rc b/2.x/trunk/ProcessHacker/ProcessHacker.rc index 674b7d934..e66e81fe6 100644 --- a/2.x/trunk/ProcessHacker/ProcessHacker.rc +++ b/2.x/trunk/ProcessHacker/ProcessHacker.rc @@ -1624,17 +1624,17 @@ BEGIN RTEXT "Static",IDC_ZCOMMITCURRENT_V,45,11,56,8,SS_ENDELLIPSIS RTEXT "Static",IDC_ZCOMMITPEAK_V,41,21,60,8,SS_ENDELLIPSIS RTEXT "Static",IDC_ZCOMMITLIMIT_V,40,31,61,8,SS_ENDELLIPSIS - GROUPBOX "Physical Memory",IDC_STATIC,112,0,118,64 + GROUPBOX "Physical Memory",IDC_STATIC,112,0,118,73 LTEXT "Current",IDC_STATIC,120,11,26,8 - LTEXT "Cache WS",IDC_STATIC,120,31,34,8 + LTEXT "Cache WS",IDC_STATIC,120,41,34,8 RTEXT "Static",IDC_ZPHYSICALCURRENT_V,165,11,57,8,SS_ENDELLIPSIS RTEXT "Static",IDC_ZPHYSICALTOTAL_V,167,21,55,8,SS_ENDELLIPSIS - RTEXT "Static",IDC_ZPHYSICALCACHEWS_V,159,31,63,8,SS_ENDELLIPSIS + RTEXT "Static",IDC_ZPHYSICALCACHEWS_V,159,41,63,8,SS_ENDELLIPSIS LTEXT "Total",IDC_STATIC,120,21,17,8 - LTEXT "Kernel WS",IDC_STATIC,120,41,34,8 - RTEXT "Static",IDC_ZPHYSICALKERNELWS_V,167,41,55,8,SS_ENDELLIPSIS - LTEXT "Driver WS",IDC_STATIC,120,51,33,8 - RTEXT "Static",IDC_ZPHYSICALDRIVERWS_V,163,51,59,8,SS_ENDELLIPSIS + LTEXT "Kernel WS",IDC_STATIC,120,51,34,8 + RTEXT "Static",IDC_ZPHYSICALKERNELWS_V,167,51,55,8,SS_ENDELLIPSIS + LTEXT "Driver WS",IDC_STATIC,120,61,33,8 + RTEXT "Static",IDC_ZPHYSICALDRIVERWS_V,163,61,59,8,SS_ENDELLIPSIS GROUPBOX "Paged Pool",IDC_STATIC,0,47,108,64 LTEXT "Working Set",IDC_STATIC,7,58,40,8 LTEXT "Limit",IDC_STATIC,7,78,15,8 @@ -1682,18 +1682,20 @@ BEGIN RTEXT "Static",IDC_ZLISTSTANDBY5_V,303,120,48,8,SS_ENDELLIPSIS RTEXT "Static",IDC_ZLISTSTANDBY6_V,303,130,48,8,SS_ENDELLIPSIS RTEXT "Static",IDC_ZLISTSTANDBY7_V,303,140,48,8,SS_ENDELLIPSIS - GROUPBOX "Paging",IDC_STATIC,112,67,118,55 - LTEXT "Page Faults Delta",IDC_STATIC,120,78,57,8 - LTEXT "Pagefile Writes Delta",IDC_STATIC,120,98,68,8 - RTEXT "Static",IDC_ZPAGINGPAGEFAULTSDELTA_V,183,78,39,8,SS_ENDELLIPSIS - RTEXT "Static",IDC_ZPAGINGPAGEREADSDELTA_V,179,88,43,8,SS_ENDELLIPSIS - RTEXT "Static",IDC_ZPAGINGPAGEFILEWRITESDELTA_V,189,98,33,8,SS_ENDELLIPSIS - LTEXT "Page Reads Delta",IDC_STATIC,120,88,58,8 - LTEXT "Mapped Writes Delta",IDC_STATIC,120,108,68,8 - RTEXT "Static",IDC_ZPAGINGMAPPEDWRITESDELTA_V,191,108,31,8,SS_ENDELLIPSIS + GROUPBOX "Paging",IDC_STATIC,112,75,118,55 + LTEXT "Page Faults Delta",IDC_STATIC,120,86,57,8 + LTEXT "Pagefile Writes Delta",IDC_STATIC,120,106,68,8 + RTEXT "Static",IDC_ZPAGINGPAGEFAULTSDELTA_V,183,86,39,8,SS_ENDELLIPSIS + RTEXT "Static",IDC_ZPAGINGPAGEREADSDELTA_V,179,96,43,8,SS_ENDELLIPSIS + RTEXT "Static",IDC_ZPAGINGPAGEFILEWRITESDELTA_V,189,106,33,8,SS_ENDELLIPSIS + LTEXT "Page Reads Delta",IDC_STATIC,120,96,58,8 + LTEXT "Mapped Writes Delta",IDC_STATIC,120,116,68,8 + RTEXT "Static",IDC_ZPAGINGMAPPEDWRITESDELTA_V,191,116,31,8,SS_ENDELLIPSIS LTEXT "Modified pagefile",IDC_STATIC,242,51,55,8 RTEXT "Static",IDC_ZLISTMODIFIEDPAGEFILE_V,303,51,48,8,SS_ENDELLIPSIS PUSHBUTTON "&More",IDC_MORE,242,152,50,14 + RTEXT "Static",IDC_ZPHYSICALRESERVED_V,167,31,55,8,SS_ENDELLIPSIS + LTEXT "Reserved",IDC_STATIC,120,31,32,8 END IDD_SYSINFO_MEM DIALOGEX 0, 0, 316, 250 @@ -2489,6 +2491,11 @@ BEGIN 0 END +IDD_SYSINFO_MEMPANEL AFX_DIALOG_LAYOUT +BEGIN + 0 +END + #endif // English (Australia) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/2.x/trunk/ProcessHacker/resource.h b/2.x/trunk/ProcessHacker/resource.h index 3a4fe3c89..d8cea811b 100644 --- a/2.x/trunk/ProcessHacker/resource.h +++ b/2.x/trunk/ProcessHacker/resource.h @@ -473,6 +473,7 @@ #define IDC_ZNONPAGEDLIMIT_V 1328 #define IDC_ZNONPAGEDALLOCSDELTA_V 1329 #define IDC_ZNONPAGEDFREESDELTA_V 1330 +#define IDC_ZPHYSICALRESERVED_V 1331 #define IDC_ZLISTZEROED_V 1332 #define IDC_ZLISTFREE_V 1333 #define IDC_ZLISTMODIFIED_V 1334 @@ -734,7 +735,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 213 +#define _APS_NEXT_RESOURCE_VALUE 214 #define _APS_NEXT_COMMAND_VALUE 40290 #define _APS_NEXT_CONTROL_VALUE 1378 #define _APS_NEXT_SYMED_VALUE 169 diff --git a/2.x/trunk/ProcessHacker/sysinfo.c b/2.x/trunk/ProcessHacker/sysinfo.c index 07ed41525..f3ed51361 100644 --- a/2.x/trunk/ProcessHacker/sysinfo.c +++ b/2.x/trunk/ProcessHacker/sysinfo.c @@ -2,7 +2,7 @@ * Process Hacker - * system information window * - * Copyright (C) 2011-2015 wj32 + * Copyright (C) 2011-2016 wj32 * * This file is part of Process Hacker. * @@ -132,6 +132,7 @@ static PH_UINT32_DELTA MappedWritesDelta; static BOOLEAN MmAddressesInitialized; static PSIZE_T MmSizeOfPagedPoolInBytes; static PSIZE_T MmMaximumNonPagedPoolInBytes; +static ULONGLONG InstalledMemory; static PPH_SYSINFO_SECTION IoSection; static HWND IoDialog; @@ -3096,7 +3097,6 @@ INT_PTR CALLBACK PhSipMemoryDialogProc( PPH_LAYOUT_ITEM graphItem; PPH_LAYOUT_ITEM panelItem; - ULONGLONG installedMemory; PhSipInitializeMemoryDialog(); @@ -3113,10 +3113,12 @@ INT_PTR CALLBACK PhSipMemoryDialogProc( if (!getPhysicallyInstalledSystemMemory) getPhysicallyInstalledSystemMemory = PhGetModuleProcAddress(L"kernel32.dll", "GetPhysicallyInstalledSystemMemory"); - if (getPhysicallyInstalledSystemMemory && getPhysicallyInstalledSystemMemory(&installedMemory)) + InstalledMemory = 0; + + if (getPhysicallyInstalledSystemMemory && getPhysicallyInstalledSystemMemory(&InstalledMemory)) { SetDlgItemText(hwndDlg, IDC_TOTALPHYSICAL, - PhaConcatStrings2(PhaFormatSize(installedMemory * 1024, -1)->Buffer, L" installed")->Buffer); + PhaConcatStrings2(PhaFormatSize(InstalledMemory * 1024, -1)->Buffer, L" installed")->Buffer); } else { @@ -3475,6 +3477,17 @@ VOID PhSipUpdateMemoryPanel( PhaFormatSize(UInt32x32To64(PhSystemBasicInformation.NumberOfPhysicalPages - PhPerfInformation.AvailablePages, PAGE_SIZE), -1)->Buffer); SetDlgItemText(MemoryPanel, IDC_ZPHYSICALTOTAL_V, PhaFormatSize(UInt32x32To64(PhSystemBasicInformation.NumberOfPhysicalPages, PAGE_SIZE), -1)->Buffer); + + if (InstalledMemory != 0) + { + SetDlgItemText(MemoryPanel, IDC_ZPHYSICALRESERVED_V, + PhaFormatSize(InstalledMemory * 1024 - UInt32x32To64(PhSystemBasicInformation.NumberOfPhysicalPages, PAGE_SIZE), -1)->Buffer); + } + else + { + SetDlgItemText(MemoryPanel, IDC_ZPHYSICALRESERVED_V, L"-"); + } + SetDlgItemText(MemoryPanel, IDC_ZPHYSICALCACHEWS_V, PhaFormatSize(UInt32x32To64(PhPerfInformation.ResidentSystemCachePage, PAGE_SIZE), -1)->Buffer); SetDlgItemText(MemoryPanel, IDC_ZPHYSICALKERNELWS_V,