Author: Gregor Wegberg <[email protected]>
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):
         #
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to