Skip to content

Windows: do not print correctly the unused memory value.(about issue#176) #183

Closed
@zzustu

Description

@zzustu

Wrong
OS: Windows Server 2019 Datacenter
total memory: 12GB
unused memory: 7.5GB (≈7GB)
but ghw print unused=total

memory (12GB physical, 12GB usable)

review fix issue#176 WQL

SELECT TotalVisibleMemorySize FROM Win32_OperatingSystem

You should use FreePhysicalMemory instead of TotalVisibleMemorySize,
picture from Microsoft WMI API website: https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-operatingsystem

TotalVisibleMemorySize (Units "kilobytes")
TotalVisibleMemorySize

FreePhysicalMemory (Units "kilobytes")
FreePhysicalMemory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions