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:
hchandirasekar
2021-01-25 04:12:05 +05:30
parent 512acd8cba
commit fb52444cdc
3 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -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