[pypy-commit] pypy gc-incminimark-pinning: always add parent of a pinned object to the list of old objects pointing to
groggi
noreply at buildbot.pypy.org
Thu Aug 14 19:05:17 CEST 2014
Author: Gregor Wegberg <code at gregorwegberg.com>
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")
More information about the pypy-commit
mailing list