Skip to content

getTotalPhysicalMemory() reports wrong value on macOS #6

@thomasgi1

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.

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