Skip to content

Commit 9ec88ce

Browse files
Rollup merge of rust-lang#85550 - pnkfelix:fix-max-rss-division-on-mac, r=Mark-Simulacrum
facepalm: operator precedence fail on my part. This bug was only visible on mac. Also, print_step_rusage is a relatively new internal feature, that is not heavily used, and has no tests. All of these factors contributed to how this went uncaught this long. Thanks to Josh Triplett for pointing it out!
2 parents 3f0bc5c + b3218d3 commit 9ec88ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/bin/rustc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ fn format_rusage_data(_child: Child) -> Option<String> {
305305
};
306306
// Mac OS X reports the maxrss in bytes, not kb.
307307
let divisor = if env::consts::OS == "macos" { 1024 } else { 1 };
308-
let maxrss = rusage.ru_maxrss + (divisor - 1) / divisor;
308+
let maxrss = (rusage.ru_maxrss + (divisor - 1)) / divisor;
309309

310310
let mut init_str = format!(
311311
"user: {USER_SEC}.{USER_USEC:03} \

0 commit comments

Comments
 (0)