@@ -153,7 +153,11 @@ GC_IMPL_FN bool rb_gc_impl_during_postmortem_p(void *objspace_ptr);
153153 * objspace impl. */
154154GC_IMPL_FN bool rb_gc_impl_obj_foreign_p (void * objspace_ptr , VALUE obj );
155155GC_IMPL_FN bool rb_gc_impl_shref_marked_p (void * objspace_ptr , VALUE obj );
156- GC_IMPL_FN size_t rb_gc_impl_zombie_heap_page_count (void * objspace_ptr );
156+ /* gc.c parked objspace_ptr in its zombie table: a terminated Ractor's objspace that
157+ * rb_gc_impl_objspace_absorb later merges. Called under the VM lock, possibly from
158+ * inside a global GC sweep (an unjoined Ractor's dfree disowns its objspace), so it
159+ * must not allocate through the GC or expect to take a barrier. */
160+ GC_IMPL_FN void rb_gc_impl_objspace_zombify (void * objspace_ptr );
157161GC_IMPL_FN void rb_gc_impl_objspace_absorb (void * dst_ptr , void * src_ptr );
158162GC_IMPL_FN void rb_gc_impl_each_object (void * objspace_ptr , void (* func )(VALUE obj , void * data ), void * data );
159163// Finalizers
@@ -172,7 +176,7 @@ GC_IMPL_FN unsigned long long rb_gc_impl_get_total_time(void *objspace_ptr);
172176GC_IMPL_FN size_t rb_gc_impl_gc_count (void * objspace_ptr );
173177GC_IMPL_FN VALUE rb_gc_impl_latest_gc_info (void * objspace_ptr , VALUE key );
174178/* A NULL objspace requests cumulative process-wide statistics. Collectors that
175- * do not support this scope must raise NotImplementedError. */
179+ * do not support them must raise NotImplementedError. */
176180GC_IMPL_FN VALUE rb_gc_impl_stat (void * objspace_ptr , VALUE hash_or_sym );
177181GC_IMPL_FN VALUE rb_gc_impl_stat_heap (void * objspace_ptr , VALUE heap_name , VALUE hash_or_sym );
178182GC_IMPL_FN const char * rb_gc_impl_active_gc_name (void );
0 commit comments