MCPcopy Create free account
hub / github.com/Niko1221/Strata / available_memory_bytes

Function available_memory_bytes

engine/src/core/expert_source.cpp:581–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579namespace {
580
581bool available_memory_bytes(uint64_t& bytes, uint64_t* commit = nullptr, std::string* why = nullptr) {
582 detail::HostMemory m;
583 if (!detail::host_available_memory(m)) {
584 if (why != nullptr && m.why != nullptr) *why = std::string(" (") + m.why + ")"; // what could not be read, for the log line
585 return false;
586 }
587 bytes = m.available;
588 if (commit != nullptr) *commit = m.commit;
589 return bytes > 0;
590}
591
592/// #1250: the pages that are really free (MemFree), not the reclaimable cache MemAvailable counts; false when unknown.
593bool free_memory_bytes(uint64_t& bytes) {

Callers 3

file_tier_unbufferedFunction · 0.70
claim_stageMethod · 0.70
pin_cache_complementMethod · 0.70

Calls 2

host_available_memoryFunction · 0.70
stringFunction · 0.50

Tested by

no test coverage detected