Author: Gregor Wegberg <[email protected]>
Branch: gc-incminimark-pinning
Changeset: r71824:d0a8ba4741c0
Date: 2014-05-14 16:52 +0200
http://bitbucket.org/pypy/pypy/changeset/d0a8ba4741c0/

Log:    fix for `test_pin_malloc_pin` testcase.

        This seems to fix also the problem running the RFile example with
        10'000 iterations and reading 512 Bytes each time. The fix feels
        correct but I must investigate more to be sure, added a # XXX
        therefore.

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
@@ -723,8 +723,9 @@
                 # move search area to the next free memory block in the
                 # nursery.
                 self.nursery_free = self.nursery_top + pinned_obj_size
-                self.move_nursery_top(llarena.getfakearenaaddress(
-                    self.nursery_barriers.popleft()) - self.nursery_free)
+                # XXX should be, but check if the new area
+                # (nursery_free to nursery_top) was reset (arena_reset()). 
(groggi)
+                self.nursery_top = self.nursery_barriers.popleft()
             else:
                 count += 1
                 #
@@ -766,7 +767,6 @@
                     ll_assert(count == 2,
                         "Seeing minor_collection() at least twice. "
                         "Too many pinned objects?")
-
             #
             # attempt to get 'totalzise' out of the nursery now.  This may
             # fail again, and then we loop. Should be the uncommon case.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to