Sha256: a0d19cf865859a143e15912ebc842f84b4dd66a209ded5050fb2dbdca8bc14df
Contents?: true
Size: 818 Bytes
Versions: 16
Compression:
Stored size: 818 Bytes
Contents
#include <internal/facts/windows/memory_resolver.hpp> #include <leatherman/windows/system_error.hpp> #include <leatherman/windows/windows.hpp> #include <leatherman/logging/logging.hpp> #include <psapi.h> using namespace leatherman::windows; namespace facter { namespace facts { namespace windows { memory_resolver::data memory_resolver::collect_data(collection& facts) { PERFORMANCE_INFORMATION statex; if (!GetPerformanceInfo(&statex, sizeof(statex))) { LOG_DEBUG("resolving memory facts failed: {1}", system_error()); return {}; } data result; result.mem_total = statex.PhysicalTotal*statex.PageSize; result.mem_free = statex.PhysicalAvailable*statex.PageSize; return result; } }}} // namespace facter::facts::windows
Version data entries
16 entries across 16 versions & 2 rubygems