diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-02-05 01:34:39 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-02-05 01:34:39 +0100 |
commit | ed2d44a8cb14f80b11522364577b65faa7c96a9a (patch) | |
tree | 08cb8a5d22a1853e3d1d3bf0122598cdcf9beede | |
parent | 9ee35ea9e9a8c148e5e79208cbf2747c972724de (diff) | |
download | psutil-mem-refactoring.tar.gz |
update docmem-refactoring
-rw-r--r-- | docs/index.rst | 12 | ||||
-rw-r--r-- | psutil/__init__.py | 2 | ||||
-rw-r--r-- | psutil/_pslinux.py | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/docs/index.rst b/docs/index.rst index 2dfb1108..5b21d224 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1064,18 +1064,20 @@ Process class .. method:: memory_addrspace_info() This method passes through the whole process address space in order to - calculate highly reliable metrics about "real" process memory consumption. + calculate highly reliable metrics about "effective" process memory + consumption. It usually requires higher privileges and is considerably slower than :meth:`memory_info`. - **uss**: (Linux, Windows, OSX) aka "Unique Set Size", this is the memory - which is unique to a process and which would be freed if the process was terminated right now. + which is unique to a process and which would be freed if the process was + terminated right now. - **pss**: (Linux) aka "Proportional Set Size", is the amount of memory shared with other processes, accounted in a way that the amount is divided evenly between the processes that share it. - I.e. if a process has 10 MBs all to itself, and 10 MBs shared with - another process, its PSS will be 15 MBs. + I.e. if a process has 10 MBs all to itself and 10 MBs shared with + another process its PSS will be 15 MBs. - **swap**: (Linux) amount memory that has been swapped out to disk. @@ -1104,7 +1106,7 @@ Process class *memtype* argument is a string that dictates what type of process memory you want to compare against. You can choose between the namedtuple field names returned by :meth:`memory_info` and :meth:`memory_addrspace_info` - (defaults to *"rss"*). + (defaults to ``"rss"``). .. versionchanged:: 3.5.0 added `memtype` parameter. diff --git a/psutil/__init__.py b/psutil/__init__.py index 5b7ee603..3d51b9ed 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -973,7 +973,7 @@ class Process(object): def memory_addrspace_info(self): """This method passes through the whole process address space - in order to calculate highly reliable metrics about "real" + in order to calculate highly reliable metrics about "effective" process memory consumption (USS and PSS). It usually requires higher privileges and is considerably diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 11e21fd7..a83056fe 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -978,7 +978,7 @@ class Process(object): _private_re=re.compile(b"Private.*:\s+(\d+)"), _pss_re=re.compile(b"Pss.*:\s+(\d+)"), _swap_re=re.compile(b"Swap.*:\s+(\d+)")): - # Note: using two regexes is faster than reading the file + # Note: using 3 regexes is faster than reading the file # line by line. # XXX: on Python 3 the 2 regexes are 30% slower than on # Python 2 though. Figure out why. |