Closed beatmax closed 8 years ago
You get crazy numbers when the memory usage doesn't fit in an int. The fix is easy:
- output->cg_rss_highwater = atoi(out); + if (sscanf(out, "%zu", &output->cg_rss_highwater) != 1) + return -1;
That's the right way to parse a number into a size_t.
Thanks for the report.
You get crazy numbers when the memory usage doesn't fit in an int. The fix is easy:
That's the right way to parse a number into a size_t.