MCPcopy Create free account
hub / github.com/WinDurango/WinDurango / ToolingMemoryStatus

Function ToolingMemoryStatus

projects/WinDurango.KernelX/src/kernelx.cpp:147–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 MemStatus.dwLength = sizeof(MemStatus);
146 GlobalMemoryStatusEx(&MemStatus);
147 UINT LastError = GetLastError();
148
149 PROCESS_MEMORY_COUNTERS ProcessMemStatus{};
150 GetProcessMemoryInfo(GetCurrentProcess(), &ProcessMemStatus, sizeof(ProcessMemStatus));
151
152 lpBuffer->ullTotalMem = MemStatus.ullTotalPhys;
153 lpBuffer->ullAvailMem = MemStatus.ullAvailPhys;
154 lpBuffer->ullLegacyUsed = MemStatus.ullTotalVirtual - MemStatus.ullAvailVirtual;
155 lpBuffer->ullLegacyAvail = MemStatus.ullAvailVirtual;

Callers

nothing calls this directly

Calls 1

SetLastErrorFunction · 0.85

Tested by

no test coverage detected