summaryrefslogtreecommitdiff
path: root/internal/vm.h
diff options
context:
space:
mode:
authorAdam Hess <[email protected]>2023-10-12 11:15:53 -0700
committerPeter Zhu <[email protected]>2023-12-07 15:52:35 -0500
commit6816e8efcff3be75f8020cd1b0ea57d3cd664bbc (patch)
tree8f8484b955ba25e9df6a2038db0f156e7cbf71e4 /internal/vm.h
parentb361a800c22e0248bf126d77e96a7bd4f9c34d1b (diff)
Free everything at shutdown
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown. Co-authored-by: Nobuyoshi Nakada <[email protected]> Co-authored-by: Peter Zhu <[email protected]>
Diffstat (limited to 'internal/vm.h')
-rw-r--r--internal/vm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/vm.h b/internal/vm.h
index d10c14eb4d..f491b5e280 100644
--- a/internal/vm.h
+++ b/internal/vm.h
@@ -83,6 +83,11 @@ void rb_check_stack_overflow(void);
extern uint64_t rb_vm_insns_count;
#endif
+extern bool rb_free_on_exit;
+
+/* miniinit.c and builtin.c */
+void rb_free_loaded_builtin_table(void);
+
/* vm_insnhelper.c */
VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
VALUE rb_eql_opt(VALUE obj1, VALUE obj2);