Replaced dynamic arrays with std::vector ,works on linux ..needs to be tested on windows after clearing up the lnk2019 error
This commit is contained in:
+1
-1
@@ -170,7 +170,6 @@ void getMemUsage(double& vm_usage_kb, double& resident_set_kb){
|
||||
using std::ios_base;
|
||||
using std::ifstream;
|
||||
using std::string;
|
||||
SYSTEM_INFO sysInfo;
|
||||
|
||||
vm_usage_kb = 0.0;
|
||||
resident_set_kb = 0.0;
|
||||
@@ -195,6 +194,7 @@ void getMemUsage(double& vm_usage_kb, double& resident_set_kb){
|
||||
#ifdef __linux__
|
||||
long page_size_kb = sysconf(_SC_PAGE_SIZE) / 1024; // in case x86-64 is configured to use 2MB pages
|
||||
#elif _WIN32
|
||||
SYSTEM_INFO sysInfo;
|
||||
long page_size_kb = sysInfo.dwPageSize/1024;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user