psutil
psutil copied to clipboard
Use system-level values for Windows virtual memory
Summary
- OS: Windows
- Bug fix: yes
- Type: core
- Fixes: #2074
Description
Submitting this as a draft PR as I believe it will address #2074. I do not have either a C or Python development environment to test these changes, so they are provided in the hopes someone else can test and confirm they fix the issue.
There's probably some room to simplify the code with temporary variables to reduce redundancy.
For background, I have implemented precisely this logic in my own (Java-based) project here and here following a detailed investigation in https://github.com/oshi/oshi/issues/1182