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

Function get_available_RAM

LASzip/src/mydefs.cpp:530–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

check_available_RAMFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected