File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -920,7 +920,8 @@ static void heap_page_free(rb_objspace_t *objspace, struct heap_page *page);
920920void
921921rb_objspace_free (rb_objspace_t * objspace )
922922{
923- gc_rest_sweep (objspace );
923+ if (is_lazy_sweeping (heap_eden ))
924+ rb_bug ("lazy sweeping underway when freeing object space" );
924925
925926 if (objspace -> profile .records ) {
926927 free (objspace -> profile .records );
@@ -2255,6 +2256,12 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
22552256 st_free_table (finalizer_table );
22562257 finalizer_table = 0 ;
22572258 ATOMIC_SET (finalizing , 0 );
2259+
2260+ /*
2261+ * finish any lazy sweeps that may have been started
2262+ * when finalizing the objects in the heap
2263+ */
2264+ gc_rest_sweep (objspace );
22582265}
22592266
22602267static inline int
You can’t perform that action at this time.
0 commit comments