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);
920
920
void
921
921
rb_objspace_free (rb_objspace_t * objspace )
922
922
{
923
- gc_rest_sweep (objspace );
923
+ if (is_lazy_sweeping (heap_eden ))
924
+ rb_bug ("lazy sweeping underway when freeing object space" );
924
925
925
926
if (objspace -> profile .records ) {
926
927
free (objspace -> profile .records );
@@ -2255,6 +2256,12 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
2255
2256
st_free_table (finalizer_table );
2256
2257
finalizer_table = 0 ;
2257
2258
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 );
2258
2265
}
2259
2266
2260
2267
static inline int
You can’t perform that action at this time.
0 commit comments