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

Fixed memory reporting for Darwin and Linux systems. #131

Closed
wants to merge 2 commits into from

Commits on Aug 21, 2015

  1. Fixed total memory reporting for Darwin systems. hw.memsize is report…

    …ed as bytes instead of pages.
    subhachandrachandra committed Aug 21, 2015
    Configuration menu
    Copy the full SHA
    a3c846b View commit details
    Browse the repository at this point in the history
  2. Fixed memory reporting for Linux systems

    /proc/meminfo reports memory in KiloBytes and so needs a multiplier of 1024 instead of 1000.
    The kernel reports in terms of pages and the proc filesystem is left shifting by 2 for 4KB pages to get KB. Since this is a binary shift, Bytes will need to shift by 10 and so get multiplied by 1024.
    
    From the kernel code. PAGE_SHIFT = 12 for 4KB pages
    "MemTotal:       %8lu kB\n", K(i.totalram)
    subhachandrachandra committed Aug 21, 2015
    Configuration menu
    Copy the full SHA
    13ee9ff View commit details
    Browse the repository at this point in the history