diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-03-11 12:16:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-11 12:16:16 +0100 |
| commit | a1ff005a5dc6712e284ea35fb3539187e67983cd (patch) | |
| tree | 704014603eaa1aa12280e2e5f316f067ac93fa78 /psutil/_pswindows.py | |
| parent | 1ddd673d6231eb79c979034a793c0f5d77503fda (diff) | |
| download | psutil-a1ff005a5dc6712e284ea35fb3539187e67983cd.tar.gz | |
[Windows] calculate USS memory by using NtQueryVirtualMemory (#1453)
Diffstat (limited to 'psutil/_pswindows.py')
| -rw-r--r-- | psutil/_pswindows.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/psutil/_pswindows.py b/psutil/_pswindows.py index 9fa14af4..6687770c 100644 --- a/psutil/_pswindows.py +++ b/psutil/_pswindows.py @@ -36,6 +36,7 @@ from ._common import conn_tmap from ._common import ENCODING from ._common import ENCODING_ERRS from ._common import isfile_strict +from ._common import memoize from ._common import memoize_when_activated from ._common import parse_environ_block from ._common import sockfam_to_enum @@ -229,6 +230,11 @@ def py2_strencode(s): return s.encode(ENCODING, ENCODING_ERRS) +@memoize +def getpagesize(): + return cext.getpagesize() + + # ===================================================================== # --- memory # ===================================================================== @@ -798,6 +804,7 @@ class Process(object): def memory_full_info(self): basic_mem = self.memory_info() uss = cext.proc_memory_uss(self.pid) + uss *= getpagesize() return pfullmem(*basic_mem + (uss, )) def memory_maps(self): |
