Author: Gregor Wegberg <[email protected]>
Branch: gc-incminimark-pinning
Changeset: r72807:249e52c74a0c
Date: 2014-08-14 16:38 +0200
http://bitbucket.org/pypy/pypy/changeset/249e52c74a0c/
Log: move old_object_pointing_to_pinned cleanup to the end of the marking
phase.
Doing it at the start of the sweeping phase just results in multiple
runs of this cleanup code. At the same time, at the end of the
marking phase we know everything we need to know to do a cleanup of
the list.
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
@@ -2102,19 +2102,19 @@
#objects_to_trace processed fully, can move on to sweeping
self.ac.mass_free_prepare()
self.start_free_rawmalloc_objects()
+ #
+ # get rid of objects pointing to pinned objects that were not
+ # visited
+ new_old_objects_pointing_to_pinned = self.AddressStack()
+ self.old_objects_pointing_to_pinned.foreach(
+ self._sweep_old_objects_pointing_to_pinned,
+ new_old_objects_pointing_to_pinned)
+ self.old_objects_pointing_to_pinned.delete()
+ self.old_objects_pointing_to_pinned =
new_old_objects_pointing_to_pinned
self.gc_state = STATE_SWEEPING
#END MARKING
elif self.gc_state == STATE_SWEEPING:
#
- # get rid of objects pointing to pinned objects that were not
- # visited
- new_old_objects_pointing_to_pinned = self.AddressStack()
- self.old_objects_pointing_to_pinned.foreach(
- self._sweep_old_objects_pointing_to_pinned,
- new_old_objects_pointing_to_pinned)
- self.old_objects_pointing_to_pinned.delete()
- self.old_objects_pointing_to_pinned =
new_old_objects_pointing_to_pinned
- #
if self.raw_malloc_might_sweep.non_empty():
# Walk all rawmalloced objects and free the ones that don't
# have the GCFLAG_VISITED flag. Visit at most 'limit' objects.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit