summaryrefslogtreecommitdiff
path: root/psutil/_pswindows.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-03-06 07:58:31 -0800
committerGiampaolo Rodola <g.rodola@gmail.com>2019-03-06 07:58:31 -0800
commitf72ccfef63aa906ea5c708ec43e1f9c238865472 (patch)
treeef58c463a3c28fef2517fba8fe9eb5fdb0c7912a /psutil/_pswindows.py
parent7a3037e7c0602f459cb7b4f0c0f887e7bb3a3d39 (diff)
downloadpsutil-win-proc-resources.tar.gz
basic skeleton, still very far from workingwin-proc-resources
Diffstat (limited to 'psutil/_pswindows.py')
-rw-r--r--psutil/_pswindows.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/psutil/_pswindows.py b/psutil/_pswindows.py
index 9fa14af4..165549cf 100644
--- a/psutil/_pswindows.py
+++ b/psutil/_pswindows.py
@@ -52,6 +52,8 @@ from ._psutil_windows import HIGH_PRIORITY_CLASS
from ._psutil_windows import IDLE_PRIORITY_CLASS
from ._psutil_windows import NORMAL_PRIORITY_CLASS
from ._psutil_windows import REALTIME_PRIORITY_CLASS
+from ._psutil_windows import WIN_RLIMIT_MEMORY
+
if sys.version_info >= (3, 4):
import enum
@@ -67,6 +69,7 @@ __extra__all__ = [
"NORMAL_PRIORITY_CLASS", "REALTIME_PRIORITY_CLASS",
"CONN_DELETE_TCB",
"AF_LINK",
+ "WIN_RLIMIT_MEMORY",
]
@@ -1057,3 +1060,10 @@ class Process(object):
ctx_switches = self.oneshot_info()[pinfo_map['ctx_switches']]
# only voluntary ctx switches are supported
return _common.pctxsw(ctx_switches, 0)
+
+ @wrap_exceptions
+ def rlimit(self, resource, limits=None):
+ if limits is None:
+ return cext.proc_rlimit_get(resource)
+ else:
+ raise NotImplementedError # XXX