| 402 | |
| 403 | #if defined(__linux__) |
| 404 | void 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 | |
| 424 | int64_t getLowWatermark(std::stringstream& zoneInfoStream) { |
| 425 | int64_t lowWatermark = 0; |
no test coverage detected