[pypy-commit] pypy gc-incminimark-pinning-countlimit: starting new branch to try out simple limit for pinned objects.

groggi noreply at buildbot.pypy.org
Mon Jun 2 17:24:42 CEST 2014


Author: Gregor Wegberg <code at gregorwegberg.com>
Branch: gc-incminimark-pinning-countlimit
Changeset: r71853:69bd40f359e7
Date: 2014-05-29 19:00 +0200
http://bitbucket.org/pypy/pypy/changeset/69bd40f359e7/

Log:	starting new branch to try out simple limit for pinned objects.

	This idea is based on the implementation in gc-minimark-pinning

diff --git a/rpython/memory/gc/incminimark.py b/rpython/memory/gc/incminimark.py
--- a/rpython/memory/gc/incminimark.py
+++ b/rpython/memory/gc/incminimark.py
@@ -965,6 +965,8 @@
             # Reason: It would be possible that the first caller unpins
             # while the second caller thinks it's still pinned.
             return False
+        if not self.should_pin(obj):
+            return False
 
         self.header(obj).tid |= GCFLAG_PINNED
         self.pinned_objects_in_nursery += 1
@@ -979,6 +981,8 @@
         self.header(obj).tid &= ~GCFLAG_PINNED
         self.pinned_objects_in_nursery -= 1
 
+    def should_pin(self, obj):
+        return True
 
     def shrink_array(self, obj, smallerlength):
         #


More information about the pypy-commit mailing list