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

Total Available Memory Confusion #16

Closed
sivetic opened this issue Oct 5, 2011 · 2 comments
Closed

Total Available Memory Confusion #16

sivetic opened this issue Oct 5, 2011 · 2 comments
Milestone

Comments

@sivetic
Copy link
Contributor

sivetic commented Oct 5, 2011

There seems to still be confusion between what units GetPhysicalmemory() returns. Comment in MachineInfo.cpp reads that total physical memory returned is in kilobytes, however extractor.cpp divides the value by 1024_1024_1024, which assumes the memory returned is in bytes. I believe there was a ticket in the old SVN system for this.

In addition, at least on my Ubuntu machine, sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE) returns the total memory in bytes, meaning that the result should be divided by 1024 to stay consistent with Apple/FreeBSD/Windows results.

@DennisOSRM
Copy link
Collaborator

Full ACK.

@DennisOSRM
Copy link
Collaborator

That part of the code is not used anymore.

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

No branches or pull requests

2 participants