diff --git a/panda/src/display/displayInformation.cxx b/panda/src/display/displayInformation.cxx index a199c1cb90..f329d13689 100644 --- a/panda/src/display/displayInformation.cxx +++ b/panda/src/display/displayInformation.cxx @@ -86,6 +86,7 @@ DisplayInformation() { _process_virtual_memory = 0; _available_process_virtual_memory = 0; _memory_load = 0; + _page_fault_count = 0; _process_memory = 0; _peak_process_memory = 0; _page_file_usage = 0; @@ -343,6 +344,16 @@ get_memory_load() { return _memory_load; } +//////////////////////////////////////////////////////////////////// +// Function: DisplayInformation::get_page_fault_count +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +PN_uint64 DisplayInformation:: +get_page_fault_count() { + return _page_fault_count; +} + //////////////////////////////////////////////////////////////////// // Function: DisplayInformation::get_process_memory // Access: Published diff --git a/panda/src/display/displayInformation.h b/panda/src/display/displayInformation.h index 117d4da975..90d7fe96b1 100644 --- a/panda/src/display/displayInformation.h +++ b/panda/src/display/displayInformation.h @@ -77,6 +77,7 @@ PUBLISHED: PN_uint64 get_process_virtual_memory(); PN_uint64 get_available_process_virtual_memory(); int get_memory_load(); + PN_uint64 get_page_fault_count(); PN_uint64 get_process_memory(); PN_uint64 get_peak_process_memory(); PN_uint64 get_page_file_usage(); @@ -104,7 +105,8 @@ public: PN_uint64 _available_page_file_size; PN_uint64 _process_virtual_memory; PN_uint64 _available_process_virtual_memory; - + + PN_uint64 _page_fault_count; PN_uint64 _process_memory; PN_uint64 _peak_process_memory; PN_uint64 _page_file_usage; diff --git a/panda/src/windisplay/winGraphicsPipe.cxx b/panda/src/windisplay/winGraphicsPipe.cxx index 30081eb284..65150dfbe8 100644 --- a/panda/src/windisplay/winGraphicsPipe.cxx +++ b/panda/src/windisplay/winGraphicsPipe.cxx @@ -88,6 +88,7 @@ void get_memory_information (DisplayInformation *display_information) process = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, process_id); if (process) { if (GetProcessMemoryInfoFunction (process, &process_memory_counters, sizeof (PROCESS_MEMORY_COUNTERS))) { + display_information -> _page_fault_count = process_memory_counters.PageFaultCount; display_information -> _process_memory = process_memory_counters.WorkingSetSize; display_information -> _peak_process_memory = process_memory_counters.PeakWorkingSetSize; display_information -> _page_file_usage = process_memory_counters.PagefileUsage;