[New-bugs-announce] [issue30513] getrusage returns platform-dependent value
sam-s
report at bugs.python.org
Tue May 30 13:01:19 EDT 2017
New submission from sam-s:
`resource.getrusage(resource.RUSAGE_SELF).ru_maxrss` returns the peak memory usage, in *bytes* on BSD (including Mac OS X) and in *kilobytes* on Linux.
This means that to get a cross-platform value, the user has to check `sys.platform`, which is fairly inconvenient.
It would seem like a good idea to return a platform-independent value (e.g., multiply the Linux return value by 1000 - or is it 1024?!)
Please see also
* https://bugs.python.org/issue20468
* https://stackoverflow.com/a/7669482/850781
Thank you!
----------
components: Library (Lib)
messages: 294768
nosy: sam-s
priority: normal
severity: normal
status: open
title: getrusage returns platform-dependent value
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30513>
_______________________________________
More information about the New-bugs-announce
mailing list