We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a65fc82 commit 6f9dc2eCopy full SHA for 6f9dc2e
1 file changed
gc/default/default.c
@@ -5061,6 +5061,18 @@ gc_sweep_finish(rb_objspace_t *objspace)
5061
for (int i = 0; i < HEAP_COUNT; i++) {
5062
rb_heap_t *heap = &heaps[i];
5063
5064
+#ifdef DEBUG_SWEEP_BOOKKEEPING
5065
+ {
5066
+ /* Assert that every page in this heap was swept. */
5067
+ struct heap_page *page;
5068
+ ccan_list_for_each(&heap->pages, page, page_node) {
5069
+ if (RUBY_ATOMIC_LOAD(page->before_sweep)) {
5070
+ rb_bug("gc_sweep_finish: page %p in heap %d still has before_sweep set", (void *)page, i);
5071
+ }
5072
5073
5074
+#endif
5075
+
5076
heap->freed_slots = 0;
5077
heap->empty_slots = 0;
5078
if (heap->background_sweep_steps < heap->foreground_sweep_steps) {
0 commit comments