diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-25 03:28:38 -0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-25 03:28:38 -0800 |
commit | bc7b5982ca9cb12c91b44aac6cf3f4698a61c369 (patch) | |
tree | 56bd85f502ed0d7938d443914c5de15b917eafb9 | |
parent | e5f7f556f8f91cf272acfd536e82293d450c5ec7 (diff) | |
download | psutil-bc7b5982ca9cb12c91b44aac6cf3f4698a61c369.tar.gz |
fix #1432: use the actual system PAGESIZE when calculating USS memory
-rw-r--r-- | HISTORY.rst | 2 | ||||
-rw-r--r-- | psutil/_psutil_windows.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index 7de87584..aa2b2fed 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,8 @@ XXXX-XX-XX - 1431_: [Windows] GetNativeSystemInfo is not used instead of GetSystemInfo in order to support WoW64 processes. Affected APIs are psutil.cpu_count(), and Process memory_maps() and memory_info_exe() ("uss" field). +- 1432_: [Windows] Process.memory_info_ex()'s USS memory is miscalculated + because we're not using the actual system PAGESIZE. 5.5.1 ===== diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index df52d436..8ab21aa7 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -808,7 +808,7 @@ psutil_proc_memory_uss(PyObject *self, PyObject *args) if (! PyArg_ParseTuple(args, "l", &pid)) return NULL; - + GetNativeSystemInfo(&system_info); proc = psutil_handle_from_pid(pid, access); if (proc == NULL) return NULL; |