MCPcopy Create free account
hub / github.com/apple/foundationdb / getMemoryInfo

Function getMemoryInfo

flow/Platform.actor.cpp:404–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402
403#if defined(__linux__)
404void getMemoryInfo(std::map<StringRef, int64_t>& request, std::stringstream& memInfoStream) {
405 size_t count = request.size();
406 if (count == 0)
407 return;
408
409 while (count > 0 && !memInfoStream.eof()) {
410 std::string key;
411
412 memInfoStream >> key;
413 auto item = request.find(StringRef(key));
414 if (item != request.end()) {
415 int64_t value;
416 memInfoStream >> value;
417 item->second = value;
418 count--;
419 }
420 memInfoStream.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
421 }
422}
423
424int64_t getLowWatermark(std::stringstream& zoneInfoStream) {
425 int64_t lowWatermark = 0;

Callers 2

getMachineRAMInfoFunction · 0.85
Platform.actor.cppFile · 0.85

Calls 5

eofMethod · 0.80
StringRefClass · 0.50
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected