We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a4d63d8 + 1ae7449 commit 0416cd0Copy full SHA for 0416cd0
1 file changed
gc.c
@@ -920,7 +920,8 @@ static void heap_page_free(rb_objspace_t *objspace, struct heap_page *page);
920
void
921
rb_objspace_free(rb_objspace_t *objspace)
922
{
923
- gc_rest_sweep(objspace);
+ if (is_lazy_sweeping(heap_eden))
924
+ rb_bug("lazy sweeping underway when freeing object space");
925
926
if (objspace->profile.records) {
927
free(objspace->profile.records);
@@ -2255,6 +2256,12 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
2255
2256
st_free_table(finalizer_table);
2257
finalizer_table = 0;
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);
2265
}
2266
2267
static inline int
0 commit comments