summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-05-03 12:00:24 -0400
committerPeter Zhu <[email protected]>2024-07-03 09:03:40 -0400
commit51bd816517941798c63e587a5a9f3caf69cd510e (patch)
treec0ad93459be4e0ae63f3e8ed3f56f93bda581a0c /vm_core.h
parent9aa62bda46bf7f9de91a95c31fa09dafd23def37 (diff)
[Feature #20470] Split GC into gc_impl.c
This commit splits gc.c into two files: - gc.c now only contains code not specific to Ruby GC. This includes code to mark objects (which the GC implementation may choose not to use) and wrappers for internal APIs that the implementation may need to use (e.g. locking the VM). - gc_impl.c now contains the implementation of Ruby's GC. This includes marking, sweeping, compaction, and statistics. Most importantly, gc_impl.c only uses public APIs in Ruby and a limited set of functions exposed in gc.c. This allows us to build gc_impl.c independently of Ruby and plug Ruby's GC into itself.
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/vm_core.h b/vm_core.h
index 3c656ff49d..8bec674963 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -609,10 +609,9 @@ typedef struct rb_at_exit_list {
struct rb_at_exit_list *next;
} rb_at_exit_list;
-struct rb_objspace;
-struct rb_objspace *rb_objspace_alloc(void);
-void rb_objspace_free(struct rb_objspace *);
-void rb_objspace_call_finalizer(struct rb_objspace *);
+void *rb_objspace_alloc(void);
+void rb_objspace_free(void *objspace);
+void rb_objspace_call_finalizer(void);
typedef struct rb_hook_list_struct {
struct rb_event_hook_struct *hooks;