Skip to content
Snippets Groups Projects
Commit 04d5b7bf authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Completely messed that one up. Commenting out the offending code for the moment. Refs #2282.

parent 76a36393
No related branches found
No related tags found
No related merge requests found
...@@ -217,25 +217,25 @@ void process_mem_system(size_t & sys_avail, size_t & sys_total) ...@@ -217,25 +217,25 @@ void process_mem_system(size_t & sys_avail, size_t & sys_total)
//g_log.debug() << "Mac - Adding reserved but unused memory of " << unusedReserved << " KB\n"; //g_log.debug() << "Mac - Adding reserved but unused memory of " << unusedReserved << " KB\n";
sys_avail += unusedReserved; sys_avail += unusedReserved;
#elif _WIN32 #elif _WIN32
MemoryInfo mi; // MemoryInfo mi;
//
GlobalMemoryStatusEx( &memStatus ); // GlobalMemoryStatusEx( &memStatus );
//
if (memStatus.ullTotalPhys < memStatus.ullTotalVirtual) // if (memStatus.ullTotalPhys < memStatus.ullTotalVirtual)
{ // {
mi.availMemory = static_cast<int>(memStatus.ullAvailPhys/1024); // mi.availMemory = static_cast<int>(memStatus.ullAvailPhys/1024);
mi.totalMemory = static_cast<int>(memStatus.ullTotalPhys/1024); // mi.totalMemory = static_cast<int>(memStatus.ullTotalPhys/1024);
} // }
else// All virtual memory will be physical, but a process cannot have more than TotalVirtual. // else// All virtual memory will be physical, but a process cannot have more than TotalVirtual.
{ // {
mi.availMemory = static_cast<int>(memStatus.ullAvailVirtual/1024); // mi.availMemory = static_cast<int>(memStatus.ullAvailVirtual/1024);
mi.totalMemory = static_cast<int>(memStatus.ullTotalVirtual/1024); // mi.totalMemory = static_cast<int>(memStatus.ullTotalVirtual/1024);
} // }
//
mi.freeRatio = static_cast<int>(100.0*mi.availMemory/mi.totalMemory); // mi.freeRatio = static_cast<int>(100.0*mi.availMemory/mi.totalMemory);
//g_log.debug() << "Percentage of memory taken to be available for use: " // //g_log.debug() << "Percentage of memory taken to be available for use: "
// << mi.freeRatio << "%.\n"; // // << mi.freeRatio << "%.\n";
return mi; // return mi;
#endif #endif
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment