shirou / gopsutil

psutil for golang
Other
10.47k stars 1.58k forks source link

[windows][mem]: change to use Performance Counter on SwapMemory. #1677

Closed shirou closed 1 month ago

shirou commented 1 month ago

Fixes: #1511

SwapMemory on windows was incorrect. This PR change SwapMemory to adjust psutil implementation. It is a method of calculating the actual value by using the Paging File(_Total)% Usage from the Performance Counter to determine the value.

Note: This PR will significantly change the value of SwapMemory on windows.