Skip to content

getTotalPhysicalMemory() reports wrong value on macOS #6

Description

@thomasgi1

On macOS the reported value of the total physical memory is 4096 times larger than the real value. According to the source code on macOS the sysctl -n hw.memsize call is used first. The result is multiplied with the page size of 4096. That multiplication is superfluous since sysctl -n hw.memsize already reports the total physical memory in bytes.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions