Skip to content

Commit baf4e81

Browse files
committed
Record real peak RSS rather than virtual memory
1 parent 53f00c2 commit baf4e81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stats.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ pair<long, long> Stats::get_rss() const {
4949
long maxrss = 0, currrss = 0;
5050

5151
while (getline(ifs, line)) {
52-
if (line.starts_with("VmPeak:")) {
53-
maxrss = stol(line.substr(7));
52+
if (line.starts_with("VmHWM:")) {
53+
maxrss = stol(line.substr(6));
5454
} else if (line.starts_with("VmRSS:")) {
5555
currrss = stol(line.substr(6));
5656
break;

0 commit comments

Comments
 (0)