Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r64111:44b73d554c47
Date: 2013-05-15 02:00 +0200
http://bitbucket.org/pypy/pypy/changeset/44b73d554c47/
Log: (brrt) expose add_memory_pressure
diff --git a/pypy/module/__pypy__/__init__.py b/pypy/module/__pypy__/__init__.py
--- a/pypy/module/__pypy__/__init__.py
+++ b/pypy/module/__pypy__/__init__.py
@@ -55,6 +55,7 @@
'validate_fd' : 'interp_magic.validate_fd',
'resizelist_hint' : 'interp_magic.resizelist_hint',
'newlist_hint' : 'interp_magic.newlist_hint',
+ 'add_memory_pressure' : 'interp_magic.add_memory_pressure',
'newdict' : 'interp_dict.newdict',
'dictstrategy' : 'interp_dict.dictstrategy',
}
diff --git a/pypy/module/__pypy__/interp_magic.py
b/pypy/module/__pypy__/interp_magic.py
--- a/pypy/module/__pypy__/interp_magic.py
+++ b/pypy/module/__pypy__/interp_magic.py
@@ -4,7 +4,7 @@
from pypy.objspace.std.listobject import W_ListObject
from pypy.objspace.std.typeobject import MethodCache
from pypy.objspace.std.mapdict import IndexCache
-from rpython.rlib import rposix
+from rpython.rlib import rposix, rgc
def internal_repr(space, w_object):
@@ -100,3 +100,7 @@
@unwrap_spec(sizehint=int)
def newlist_hint(space, sizehint):
return space.newlist_hint(sizehint)
+
+@unwrap_spec(estimate=int)
+def add_memory_pressure(estimate):
+ rgc.add_memory_pressure(estimate)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit