MCPcopy Create free account
hub / github.com/Icinga/icinga2 / EnumPageFilesProc

Function EnumPageFilesProc

plugins/check_swap.cpp:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32static bool l_Debug;
33
34BOOL EnumPageFilesProc(LPVOID pContext, PENUM_PAGE_FILE_INFORMATION pPageFileInfo, LPCWSTR lpFilename) {
35 std::vector<pageFileInfo>* pageFile = static_cast<std::vector<pageFileInfo>*>(pContext);
36 SYSTEM_INFO systemInfo;
37
38 GetSystemInfo(&systemInfo);
39
40 // pPageFileInfo output is in pages, we need to multiply it by the page size
41 pageFile->push_back({ pPageFileInfo->TotalSize * systemInfo.dwPageSize, (pPageFileInfo->TotalSize - pPageFileInfo->TotalInUse) * systemInfo.dwPageSize });
42
43 return TRUE;
44}
45
46static int parseArguments(int ac, WCHAR **av, po::variables_map& vm, printInfoStruct& printInfo)
47{

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected