Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemoryUsage extension works incorrectly on OS X #529

Closed
kmike opened this issue Jan 14, 2014 · 2 comments · Fixed by #530
Closed

MemoryUsage extension works incorrectly on OS X #529

kmike opened this issue Jan 14, 2014 · 2 comments · Fixed by #530
Labels
Milestone

Comments

@kmike
Copy link
Member

kmike commented Jan 14, 2014

The problem is that it uses ru_maxrss which is non-standard. It is in KB on Linux, but on OS X 10.9.1 it is in bytes:

$ python -c "import resource; print(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)"
4235264

I don't know if it is in bytes or in kilobytes in earlier OS X versions. It'll be great if somebody who have not updated to Mavericks check that. Anyone here? If not supporting OS X versions earlier than Maverick is fine, we could add a sys.platform check.

@kmike
Copy link
Member Author

kmike commented Jan 14, 2014

Found this thread from 2009: http://lists.apple.com/archives/darwin-kernel/2009/Mar/msg00005.html - it seems it is bytes for earlier OS X versions as well.

@pablohoffman
Copy link
Member

Nice fix!. That's why we need good developers using a Mac :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants