Author: Gregor Wegberg <[email protected]>
Branch: gc-incminimark-pinning
Changeset: r72806:998fdf343c42
Date: 2014-08-14 16:35 +0200
http://bitbucket.org/pypy/pypy/changeset/998fdf343c42/
Log: always add parent of a pinned object to the list of old objects
pointing to pinned objects.
Forgot to think about the case where two (or more) old objects point
to the same pinned one. Each of this old objects must be in the list
as if one dies, we still have to keep the pinned object alive (and
pinned).
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
@@ -1862,14 +1862,15 @@
#
elif self._is_pinned(obj):
hdr = self.header(obj)
+ # track parent of pinned object specially
+ if parent != llmemory.NULL:
+ self.old_objects_pointing_to_pinned.append(parent)
+
if hdr.tid & GCFLAG_VISITED:
# already visited and keeping track of the object
return
hdr.tid |= GCFLAG_VISITED
#
- if parent != llmemory.NULL:
- self.old_objects_pointing_to_pinned.append(parent)
- #
# XXX add additional checks for unsupported pinned objects (groggi)
ll_assert(not self.header(obj).tid & GCFLAG_HAS_CARDS,
"pinned object with GCFLAG_HAS_CARDS not supported")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit