This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mahmoud
Recipients docs@python, mahmoud
Date 2015-05-13.06:21:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The resource module's description of resource.getpagesize is woefully misguiding. Reproduced in full for convenience:


    Returns the number of bytes in a system page. (This need not be the same as the hardware page size.) This function is useful for determining the number of bytes of memory a process is using. The third element of the tuple returned by getrusage() describes memory usage in pages; multiplying by page size produces number of bytes.

Besides being vague by not referring to the third element as ru_maxrss, the peak RSS for the process (i.e., not the current memory usage), tests on Linux, Darwin, and FreeBSD show the following:

  * Linux: ru_maxrss is in kilobytes
  * Darwin (OS X): ru_maxrss is in bytes
  * FreeBSD: ru_maxrss is in kilobytes (same as Linux)

Knowing the page size is probably useful to someone, but the misinformation has definitely sent more than one person down the wrong path here. Additionally, the correct information should be up in the getrusage() method documentation, closer to relevant field descriptions.

Date User Action Args
2015-05-13 06:21:32mahmoudsetrecipients: + mahmoud, docs@python
2015-05-13 06:21:32mahmoudsetmessageid: <>
2015-05-13 06:21:32mahmoudlinkissue24172 messages
2015-05-13 06:21:31mahmoudcreate