Skip to content

Commit

Permalink
[REFACT] Show log about used memory only when no cache available
Browse files Browse the repository at this point in the history
  • Loading branch information
hasherezade committed Jun 1, 2024
1 parent 90105da commit 27e8c96
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions scanners/module_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,18 @@ bool pesieve::ModulesCache::isCacheAvailable(const size_t neededSize)
}

#ifdef _DEBUG
std::cout << "C: " << std::hex << ppsmemCounter.WorkingSetSize
<< "\tP: " << std::hex << ppsmemCounter.PeakWorkingSetSize
<< "\tMin: " << minSize
<< "\tMax: " << maxSize
<< "\tGlobalMem Av Virt: " << std::hex << memStatus.ullAvailVirtual
<< std::dec << "\tPerc: " << memStatus.dwMemoryLoad
<< std::dec << " PercPeak: " << percPeak
<< " HasFree: " << hasFree
<< std::endl;
if (!hasFree) {
std::cout << "C: " << std::hex << ppsmemCounter.WorkingSetSize
<< "\tP: " << std::hex << ppsmemCounter.PeakWorkingSetSize
<< "\tMin: " << minSize
<< "\tMax: " << maxSize
<< "\tGlobalMem Av Virt: " << std::hex << memStatus.ullAvailVirtual
<< std::dec << "\tPerc: " << memStatus.dwMemoryLoad
<< std::dec << " PercPeak: " << percPeak
<< " HasFree: " << hasFree
<< " modulesCount: " << cachedModules.size()
<< std::endl;
}
#endif
return hasFree;
}
}

0 comments on commit 27e8c96

Please sign in to comment.