MCPcopy Create free account
hub / github.com/DigitalInBlue/Celero / GetRAMSystemUsedByCurrentProcess

Method GetRAMSystemUsedByCurrentProcess

src/Memory.cpp:201–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201int64_t celero::GetRAMSystemUsedByCurrentProcess()
202{
203#ifdef _WIN32
204 PROCESS_MEMORY_COUNTERS_EX pmc;
205 GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast<PPROCESS_MEMORY_COUNTERS>(&pmc), sizeof(pmc));
206 return static_cast<int64_t>(pmc.WorkingSetSize);
207#else
208 return celero::GetRAMPhysicalUsedByCurrentProcess() + celero::GetRAMVirtualUsedByCurrentProcess();
209#endif
210}
211
212int64_t celero::GetRAMPhysicalTotal()
213{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected