[pypy-commit] pypy gc-minimark-pinning: fix the GC

fijal noreply at buildbot.pypy.org
Mon Apr 23 12:48:25 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: gc-minimark-pinning
Changeset: r54666:96bd990a70e5
Date: 2012-04-23 12:47 +0200
http://bitbucket.org/pypy/pypy/changeset/96bd990a70e5/

Log:	fix the GC

diff --git a/pypy/rpython/memory/gc/minimark.py b/pypy/rpython/memory/gc/minimark.py
--- a/pypy/rpython/memory/gc/minimark.py
+++ b/pypy/rpython/memory/gc/minimark.py
@@ -800,8 +800,7 @@
 
     def can_move(self, obj):
         """Overrides the parent can_move()."""
-        return (self.is_in_nursery(obj) and
-                not self.header(obj).tid & GCFLAG_PINNED)
+        return not self.is_in_nursery(obj)
 
     def pin(self, obj):
         if not self.is_in_nursery(obj):
@@ -810,6 +809,8 @@
         # better check though.
         if self.pinned_objects_in_nursery >= self.max_number_of_pinned_objects:
             return False
+        if self.header(obj).tid | GCFLAG_PINNED:
+            return False
         self.pinned_objects_in_nursery += 1
         self.header(obj).tid |= GCFLAG_PINNED
         return True


More information about the pypy-commit mailing list