| 2324 | |
| 2325 | |
| 2326 | Try<Bytes> limit_in_bytes(const string& hierarchy, const string& cgroup) |
| 2327 | { |
| 2328 | Try<string> read = cgroups::read( |
| 2329 | hierarchy, cgroup, "memory.limit_in_bytes"); |
| 2330 | |
| 2331 | if (read.isError()) { |
| 2332 | return Error(read.error()); |
| 2333 | } |
| 2334 | |
| 2335 | return Bytes::parse(strings::trim(read.get()) + "B"); |
| 2336 | } |
| 2337 | |
| 2338 | |
| 2339 | Try<Nothing> limit_in_bytes( |