Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions gc/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ MODULAR_GC_FN void rb_gc_vm_each_objspace(void (*func)(void *objspace, void *dat
MODULAR_GC_FN void rb_gc_each_registered_addr(rb_gc_registered_addr_cb func, void *data);
/* Verifier support, valid only with the world stopped (no extra locking inside). */
MODULAR_GC_FN bool rb_gc_registered_addr_owned_by_registrant_p(VALUE *addr, void *objspace);
MODULAR_GC_FN bool rb_gc_vm_zombie_objspace_p(void *objspace);
MODULAR_GC_FN size_t rb_gc_vm_zombie_total_pages(void);
MODULAR_GC_FN unsigned int rb_gc_vm_ractor_count(void);
MODULAR_GC_FN void rb_gc_vm_refresh_zombie_pages(void);
/* No MODULAR_GC_FN: the VM side (ractor.c) calls this too, so it needs external
* linkage even in a non-modular build (see internal/gc.h). */
bool rb_gc_single_objspace_p(void);
Expand Down
8 changes: 6 additions & 2 deletions gc/gc_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ GC_IMPL_FN bool rb_gc_impl_during_postmortem_p(void *objspace_ptr);
* objspace impl. */
GC_IMPL_FN bool rb_gc_impl_obj_foreign_p(void *objspace_ptr, VALUE obj);
GC_IMPL_FN bool rb_gc_impl_shref_marked_p(void *objspace_ptr, VALUE obj);
GC_IMPL_FN size_t rb_gc_impl_zombie_heap_page_count(void *objspace_ptr);
/* gc.c parked objspace_ptr in its zombie table: a terminated Ractor's objspace that
* rb_gc_impl_objspace_absorb later merges. Called under the VM lock, possibly from
* inside a global GC sweep (an unjoined Ractor's dfree disowns its objspace), so it
* must not allocate through the GC or expect to take a barrier. */
GC_IMPL_FN void rb_gc_impl_objspace_zombify(void *objspace_ptr);
GC_IMPL_FN void rb_gc_impl_objspace_absorb(void *dst_ptr, void *src_ptr);
GC_IMPL_FN void rb_gc_impl_each_object(void *objspace_ptr, void (*func)(VALUE obj, void *data), void *data);
// Finalizers
Expand All @@ -172,7 +176,7 @@ GC_IMPL_FN unsigned long long rb_gc_impl_get_total_time(void *objspace_ptr);
GC_IMPL_FN size_t rb_gc_impl_gc_count(void *objspace_ptr);
GC_IMPL_FN VALUE rb_gc_impl_latest_gc_info(void *objspace_ptr, VALUE key);
/* A NULL objspace requests cumulative process-wide statistics. Collectors that
* do not support this scope must raise NotImplementedError. */
* do not support them must raise NotImplementedError. */
GC_IMPL_FN VALUE rb_gc_impl_stat(void *objspace_ptr, VALUE hash_or_sym);
GC_IMPL_FN VALUE rb_gc_impl_stat_heap(void *objspace_ptr, VALUE heap_name, VALUE hash_or_sym);
GC_IMPL_FN const char *rb_gc_impl_active_gc_name(void);
Expand Down
5 changes: 2 additions & 3 deletions gc/mmtk/mmtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1858,11 +1858,10 @@ rb_gc_impl_shref_marked_p(void *objspace_ptr, VALUE obj)
return true;
}

size_t
rb_gc_impl_zombie_heap_page_count(void *objspace_ptr)
void
rb_gc_impl_objspace_zombify(void *objspace_ptr)
{
/* With a single objspace zombie_objspaces is always empty. */
return 0;
}

void
Expand Down
Loading