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

Function meminfo_bytes

engine/src/core/expert_source.cpp:168–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168uint64_t meminfo_bytes(const std::string& meminfo_text, const std::string& key) {
169 std::istringstream in(meminfo_text);
170 std::string line;
171 const std::string want = key + ":";
172 while (std::getline(in, line)) {
173 std::istringstream fields(line);
174 std::string k, unit;
175 uint64_t value = 0;
176 if (fields >> k >> value && k == want) {
177 fields >> unit;
178 return unit == "kB" ? value * 1024 : value;
179 }
180 }
181 return 0;
182}
183
184uint64_t numa_pin_free(uint64_t global_free, const std::vector<uint64_t>& node_free) {
185 if (node_free.size() < 2) return global_free;

Callers 5

page_cache_hintFunction · 0.70
free_memory_bytesFunction · 0.70
gate_cache_roomFunction · 0.70
mainFunction · 0.50
test_pin_pacingFunction · 0.50

Calls

no outgoing calls

Tested by 2

mainFunction · 0.40
test_pin_pacingFunction · 0.40