13#ifdef BUILDING_MODULAR_GC
24# define GC_IMPL_FN static
28GC_IMPL_FN
void *rb_gc_impl_objspace_alloc(
void);
29GC_IMPL_FN
void rb_gc_impl_objspace_init(
void *objspace_ptr);
30GC_IMPL_FN
void rb_gc_impl_objspace_free(
void *objspace_ptr);
31GC_IMPL_FN
void *rb_gc_impl_ractor_cache_alloc(
void *objspace_ptr,
void *ractor);
32GC_IMPL_FN
void rb_gc_impl_ractor_cache_free(
void *objspace_ptr,
void *cache);
33GC_IMPL_FN
void rb_gc_impl_set_params(
void *objspace_ptr);
34GC_IMPL_FN
void rb_gc_impl_init(
void);
35GC_IMPL_FN
size_t *rb_gc_impl_heap_sizes(
void *objspace_ptr);
37GC_IMPL_FN
void rb_gc_impl_shutdown_free_objects(
void *objspace_ptr);
39GC_IMPL_FN
void rb_gc_impl_start(
void *objspace_ptr,
bool full_mark,
bool immediate_mark,
bool immediate_sweep,
bool compact);
40GC_IMPL_FN
bool rb_gc_impl_during_gc_p(
void *objspace_ptr);
41GC_IMPL_FN
void rb_gc_impl_prepare_heap(
void *objspace_ptr);
42GC_IMPL_FN
void rb_gc_impl_gc_enable(
void *objspace_ptr);
43GC_IMPL_FN
void rb_gc_impl_gc_disable(
void *objspace_ptr,
bool finish_current_gc);
44GC_IMPL_FN
bool rb_gc_impl_gc_enabled_p(
void *objspace_ptr);
45GC_IMPL_FN
void rb_gc_impl_stress_set(
void *objspace_ptr,
VALUE flag);
46GC_IMPL_FN
VALUE rb_gc_impl_stress_get(
void *objspace_ptr);
47GC_IMPL_FN
VALUE rb_gc_impl_config_get(
void *objspace_ptr);
48GC_IMPL_FN
void rb_gc_impl_config_set(
void *objspace_ptr,
VALUE hash);
50GC_IMPL_FN
VALUE rb_gc_impl_new_obj(
void *objspace_ptr,
void *cache_ptr,
VALUE klass,
VALUE flags,
VALUE v1,
VALUE v2,
VALUE v3,
bool wb_protected,
size_t alloc_size);
51GC_IMPL_FN
size_t rb_gc_impl_obj_slot_size(
VALUE obj);
52GC_IMPL_FN
size_t rb_gc_impl_heap_id_for_size(
void *objspace_ptr,
size_t size);
53GC_IMPL_FN
bool rb_gc_impl_size_allocatable_p(
size_t size);
67GC_IMPL_FN
void *rb_gc_impl_malloc(
void *objspace_ptr,
size_t size);
68GC_IMPL_FN
void *rb_gc_impl_calloc(
void *objspace_ptr,
size_t size);
69GC_IMPL_FN
void *rb_gc_impl_realloc(
void *objspace_ptr,
void *ptr,
size_t new_size,
size_t old_size);
70GC_IMPL_FN
void rb_gc_impl_free(
void *objspace_ptr,
void *ptr,
size_t old_size);
71GC_IMPL_FN
void rb_gc_impl_adjust_memory_usage(
void *objspace_ptr, ssize_t diff);
73GC_IMPL_FN
void rb_gc_impl_mark(
void *objspace_ptr,
VALUE obj);
74GC_IMPL_FN
void rb_gc_impl_mark_and_move(
void *objspace_ptr,
VALUE *ptr);
75GC_IMPL_FN
void rb_gc_impl_mark_and_pin(
void *objspace_ptr,
VALUE obj);
76GC_IMPL_FN
void rb_gc_impl_mark_maybe(
void *objspace_ptr,
VALUE obj);
77GC_IMPL_FN
void rb_gc_impl_mark_weak(
void *objspace_ptr,
VALUE *ptr);
78GC_IMPL_FN
void rb_gc_impl_remove_weak(
void *objspace_ptr,
VALUE parent_obj,
VALUE *ptr);
80GC_IMPL_FN
bool rb_gc_impl_object_moved_p(
void *objspace_ptr,
VALUE obj);
81GC_IMPL_FN
VALUE rb_gc_impl_location(
void *objspace_ptr,
VALUE value);
83GC_IMPL_FN
void rb_gc_impl_writebarrier(
void *objspace_ptr,
VALUE a,
VALUE b);
84GC_IMPL_FN
void rb_gc_impl_writebarrier_unprotect(
void *objspace_ptr,
VALUE obj);
85GC_IMPL_FN
void rb_gc_impl_writebarrier_remember(
void *objspace_ptr,
VALUE obj);
87GC_IMPL_FN
void rb_gc_impl_each_objects(
void *objspace_ptr,
int (*callback)(
void *,
void *,
size_t,
void *),
void *data);
88GC_IMPL_FN
void rb_gc_impl_each_object(
void *objspace_ptr,
void (*func)(
VALUE obj,
void *data),
void *data);
90GC_IMPL_FN
void rb_gc_impl_make_zombie(
void *objspace_ptr,
VALUE obj,
void (*dfree)(
void *),
void *data);
91GC_IMPL_FN
VALUE rb_gc_impl_define_finalizer(
void *objspace_ptr,
VALUE obj,
VALUE block);
92GC_IMPL_FN
void rb_gc_impl_undefine_finalizer(
void *objspace_ptr,
VALUE obj);
93GC_IMPL_FN
void rb_gc_impl_copy_finalizer(
void *objspace_ptr,
VALUE dest,
VALUE obj);
94GC_IMPL_FN
void rb_gc_impl_shutdown_call_finalizer(
void *objspace_ptr);
96GC_IMPL_FN
VALUE rb_gc_impl_object_id(
void *objspace_ptr,
VALUE obj);
97GC_IMPL_FN
VALUE rb_gc_impl_object_id_to_ref(
void *objspace_ptr,
VALUE object_id);
99GC_IMPL_FN
void rb_gc_impl_before_fork(
void *objspace_ptr);
100GC_IMPL_FN
void rb_gc_impl_after_fork(
void *objspace_ptr, rb_pid_t pid);
102GC_IMPL_FN
void rb_gc_impl_set_measure_total_time(
void *objspace_ptr,
VALUE flag);
103GC_IMPL_FN
bool rb_gc_impl_get_measure_total_time(
void *objspace_ptr);
104GC_IMPL_FN
unsigned long long rb_gc_impl_get_total_time(
void *objspace_ptr);
105GC_IMPL_FN
size_t rb_gc_impl_gc_count(
void *objspace_ptr);
106GC_IMPL_FN
VALUE rb_gc_impl_latest_gc_info(
void *objspace_ptr,
VALUE key);
107GC_IMPL_FN
VALUE rb_gc_impl_stat(
void *objspace_ptr,
VALUE hash_or_sym);
108GC_IMPL_FN
VALUE rb_gc_impl_stat_heap(
void *objspace_ptr,
VALUE heap_name,
VALUE hash_or_sym);
109GC_IMPL_FN
const char *rb_gc_impl_active_gc_name(
void);
111GC_IMPL_FN
size_t rb_gc_impl_obj_flags(
void *objspace_ptr,
VALUE obj,
ID* flags,
size_t max);
112GC_IMPL_FN
bool rb_gc_impl_pointer_to_heap_p(
void *objspace_ptr,
const void *ptr);
113GC_IMPL_FN
bool rb_gc_impl_garbage_object_p(
void *objspace_ptr,
VALUE obj);
114GC_IMPL_FN
void rb_gc_impl_set_event_hook(
void *objspace_ptr,
const rb_event_flag_t event);
115GC_IMPL_FN
void rb_gc_impl_copy_attributes(
void *objspace_ptr,
VALUE dest,
VALUE obj);
uint32_t rb_event_flag_t
Represents event(s).
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.