Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Public APIs related to rb_mGC. More...
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
#include "ruby/backward/2/attributes.h"
Go to the source code of this file.
Functions | |
void | rb_memerror (void) |
int | rb_during_gc (void) |
void | rb_gc_mark_locations (const VALUE *, const VALUE *) |
void | rb_mark_tbl (struct st_table *) |
void | rb_mark_tbl_no_pin (struct st_table *) |
void | rb_mark_set (struct st_table *) |
void | rb_mark_hash (struct st_table *) |
void | rb_gc_update_tbl_refs (st_table *ptr) |
void | rb_gc_mark_maybe (VALUE) |
void | rb_gc_mark (VALUE) |
void | rb_gc_mark_movable (VALUE) |
VALUE | rb_gc_location (VALUE) |
void | rb_gc_force_recycle (VALUE) |
void | rb_gc (void) |
void | rb_gc_copy_finalizer (VALUE, VALUE) |
VALUE | rb_gc_enable (void) |
VALUE | rb_gc_disable (void) |
VALUE | rb_gc_start (void) |
VALUE | rb_define_finalizer (VALUE, VALUE) |
VALUE | rb_undefine_finalizer (VALUE) |
size_t | rb_gc_count (void) |
size_t | rb_gc_stat (VALUE) |
VALUE | rb_gc_latest_gc_info (VALUE) |
void | rb_gc_adjust_memory_usage (ssize_t) |
Public APIs related to rb_mGC.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. Definition in file gc.h.
int rb_during_gc | ( | void | ) |
Definition at line 9505 of file gc.c.
References during_gc, and rb_objspace.
Referenced by rb_ec_stack_overflow().
void rb_gc | ( | void | ) |
Definition at line 9497 of file gc.c.
References GPR_DEFAULT_REASON, and rb_objspace.
Referenced by rb_fdopen(), rb_gc_for_fd(), rb_gc_start(), rb_reg_region_copy(), and rsock_s_accept().
void rb_gc_adjust_memory_usage | ( | ssize_t | diff | ) |
Definition at line 11062 of file gc.c.
References MEMOP_TYPE_REALLOC, and rb_objspace.
Definition at line 3612 of file gc.c.
References finalizer_table, FL_FINALIZE, FL_SET, FL_TEST, rb_objspace, st_insert, and st_lookup.
size_t rb_gc_count | ( | void | ) |
Definition at line 9529 of file gc.c.
References rb_objspace::count, and rb_objspace::profile.
VALUE rb_gc_disable | ( | void | ) |
Definition at line 9925 of file gc.c.
References rb_objspace, and rb_objspace_gc_disable().
VALUE rb_gc_enable | ( | void | ) |
Definition at line 9888 of file gc.c.
References rb_objspace, and rb_objspace_gc_enable().
void rb_gc_force_recycle | ( | VALUE | obj | ) |
Definition at line 7968 of file gc.c.
References CLEAR_IN_BITMAP, heap_page::flags, gc_report, GET_HEAP_MARK_BITS, GET_HEAP_MARKING_BITS, GET_HEAP_PAGE, GET_HEAP_PINNED_BITS, GET_HEAP_UNCOLLECTIBLE_BITS, GET_HEAP_WB_UNPROTECTED_BITS, is_incremental_marking, rb_objspace::mark_stack, MARKED_IN_BITMAP, rb_objspace::old_objects, rb_objspace::profile, rb_objspace, RB_VM_LOCK_ENTER, RB_VM_LOCK_LEAVE, rb_objspace::rgengc, and rb_objspace::total_freed_objects.
Referenced by rb_big_isqrt(), rb_parser_free(), and rb_str_tmp_frozen_release().
Definition at line 9634 of file gc.c.
References key, and rb_objspace.
Definition at line 9003 of file gc.c.
References BUILTIN_TYPE, GC_ASSERT, RMOVED, SPECIAL_CONST_P, T_MOVED, T_NONE, and iseq_inline_constant_cache_entry::value.
Referenced by rb_execution_context_update(), rb_fiber_update_self(), rb_iseq_update_references(), rb_raw_obj_info(), and rb_vm_update_references().
void rb_gc_mark | ( | VALUE | ptr | ) |
Definition at line 6112 of file gc.c.
References ptr.
Referenced by random_mark(), rb_ast_mark(), rb_execution_context_mark(), rb_hook_list_mark(), rb_iseq_mark(), rb_iseq_mark_insn_storage(), rb_mark_end_proc(), rb_strterm_mark(), and rb_vm_mark().
Definition at line 5580 of file gc.c.
References heap_page::start.
Referenced by rb_execution_context_mark().
void rb_gc_mark_maybe | ( | VALUE | obj | ) |
Definition at line 5931 of file gc.c.
Referenced by rb_gvar_var_marker().
void rb_gc_mark_movable | ( | VALUE | ptr | ) |
Definition at line 6106 of file gc.c.
References ptr.
Referenced by rb_execution_context_mark(), rb_fiber_mark_self(), rb_gvar_val_marker(), rb_iseq_mark(), and rb_vm_mark().
void rb_gc_update_tbl_refs | ( | st_table * | ptr | ) |
Definition at line 8850 of file gc.c.
References ptr, and rb_objspace.
Referenced by rb_vm_update_references().
void rb_mark_set | ( | struct st_table * | tbl | ) |
Definition at line 5686 of file gc.c.
Referenced by rb_iseq_build_from_ary().
void rb_mark_tbl | ( | struct st_table * | tbl | ) |
Definition at line 5893 of file gc.c.
Referenced by rb_vm_mark().
void rb_memerror | ( | void | ) |
Definition at line 10309 of file gc.c.
References during_gc, EC_JUMP_TAG, rb_execution_context_struct::errinfo, gc_raise_tag::exc, EXIT_FAILURE, gc_enter_event_rb_memerror, nomem_error, NULL, RAISED_NOMEMORY, rb_ec_raised_clear, rb_ec_raised_p, rb_ec_raised_set, rb_objspace_of, ruby_vm_special_exception_copy(), and TAG_RAISE.
Referenced by rb_gc_unprotect_logging(), and rb_reg_start_with_p().
Definition at line 3453 of file gc.c.
References finalizer_table, FL_FINALIZE, FL_UNSET, rb_check_frozen, rb_objspace, and st_delete.