MCPcopy Create free account
hub / github.com/LASzip/LASzip / get_available_RAM

Function get_available_RAM

src/mydefs.cpp:534–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532/// Note that this value is only a snapshot.
533#ifdef _WIN32
534size_t get_available_RAM() {
535 MEMORYSTATUSEX statex;
536 statex.dwLength = sizeof(statex);
537 if (GlobalMemoryStatusEx(&statex)) {
538 return statex.ullAvailPhys;
539 }
540 return 0;
541}
542#else
543size_t get_available_RAM() {
544 FILE* f = fopen("/proc/meminfo", "r");

Callers 1

check_available_RAMFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected