shirou / gopsutil

psutil for golang
Other
10.36k stars 1.57k forks source link

Windows, read all PIDs if there are more than 1024 PIDs. #1580

Closed jnewmano closed 6 months ago

jnewmano commented 6 months ago

Convert bytes read to number of uint32s that were read.

Lomanic commented 6 months ago

This amends #454, confirmed with the test I described there (replacing the 1024 magic numbers with a small value, like 32, and adding some debug in the loop logging psSize to see it increase). I'm not sure to understand why my test worked at the time, in the meantime the w32 dependency was removed, but it doesn't look suspicious? Anyway, thanks for fixing this long standing bug @jnewmano