Skip to content

Commit 36e0248

Browse files
authored
sys::resource update max_rss accessor doc to reflect the unit per platform (#2333)
1 parent 346c1c3 commit 36e0248

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sys/resource.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@ impl Usage {
293293
TimeVal::from(self.0.ru_stime)
294294
}
295295

296-
/// The resident set size at its peak, in kilobytes.
296+
/// The resident set size at its peak,
297+
#[cfg_attr(apple_targets, doc = " in bytes.")]
298+
#[cfg_attr(not(apple_targets), doc = " in kilobytes.")]
297299
pub fn max_rss(&self) -> c_long {
298300
self.0.ru_maxrss
299301
}

0 commit comments

Comments
 (0)