Skip to content

Commit 03ed0ac

Browse files
Vendor the new Ruby headers
1 parent cc1c894 commit 03ed0ac

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎gc/gc.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ MODULAR_GC_FN void rb_gc_vm_each_objspace(void (*func)(void *objspace, void *dat
7979
MODULAR_GC_FN void rb_gc_each_registered_addr(rb_gc_registered_addr_cb func, void *data);
8080
/* Verifier support, valid only with the world stopped (no extra locking inside). */
8181
MODULAR_GC_FN bool rb_gc_registered_addr_owned_by_registrant_p(VALUE *addr, void *objspace);
82-
MODULAR_GC_FN bool rb_gc_vm_zombie_objspace_p(void *objspace);
83-
MODULAR_GC_FN size_t rb_gc_vm_zombie_total_pages(void);
8482
MODULAR_GC_FN unsigned int rb_gc_vm_ractor_count(void);
85-
MODULAR_GC_FN void rb_gc_vm_refresh_zombie_pages(void);
8683
/* No MODULAR_GC_FN: the VM side (ractor.c) calls this too, so it needs external
8784
* linkage even in a non-modular build (see internal/gc.h). */
8885
bool rb_gc_single_objspace_p(void);

‎gc/gc_impl.h‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ GC_IMPL_FN bool rb_gc_impl_during_postmortem_p(void *objspace_ptr);
153153
* objspace impl. */
154154
GC_IMPL_FN bool rb_gc_impl_obj_foreign_p(void *objspace_ptr, VALUE obj);
155155
GC_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);
157161
GC_IMPL_FN void rb_gc_impl_objspace_absorb(void *dst_ptr, void *src_ptr);
158162
GC_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);
172176
GC_IMPL_FN size_t rb_gc_impl_gc_count(void *objspace_ptr);
173177
GC_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. */
176180
GC_IMPL_FN VALUE rb_gc_impl_stat(void *objspace_ptr, VALUE hash_or_sym);
177181
GC_IMPL_FN VALUE rb_gc_impl_stat_heap(void *objspace_ptr, VALUE heap_name, VALUE hash_or_sym);
178182
GC_IMPL_FN const char *rb_gc_impl_active_gc_name(void);

0 commit comments

Comments
 (0)