Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Macros | |
#define | SET_MACHINE_STACK_END(p) rb_gc_set_stack_end(p) |
#define | USE_CONSERVATIVE_STACK_END |
#define | RUBY_MARK_FREE_DEBUG 0 |
#define | RUBY_MARK_ENTER(msg) |
#define | RUBY_MARK_LEAVE(msg) |
#define | RUBY_FREE_ENTER(msg) |
#define | RUBY_FREE_LEAVE(msg) |
#define | RUBY_GC_INFO if(0)printf |
#define | RUBY_MARK_UNLESS_NULL(ptr) |
#define | RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;} |
#define | stack_growup_p(x) |
#define | STACK_UPPER(x, a, b) (stack_growup_p(x) ? (a) : (b)) |
#define | STACK_GROW_DIR_DETECTION VALUE stack_grow_dir_detection |
#define | STACK_DIR_UPPER(a, b) STACK_UPPER(&stack_grow_dir_detection, (a), (b)) |
#define | IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0) |
Functions | |
NOINLINE (void rb_gc_set_stack_end(VALUE **stack_end_p)) | |
int | ruby_get_stack_grow_direction (volatile VALUE *addr) |
const char * | rb_obj_info (VALUE obj) |
const char * | rb_raw_obj_info (char *buff, const int buff_size, VALUE obj) |
void | rb_obj_info_dump (VALUE obj) |
RUBY_SYMBOL_EXPORT_BEGIN size_t | rb_objspace_data_type_memsize (VALUE obj) |
void | rb_objspace_reachable_objects_from (VALUE obj, void(func)(VALUE, void *), void *data) |
void | rb_objspace_reachable_objects_from_root (void(func)(const char *category, VALUE, void *), void *data) |
int | rb_objspace_markable_object_p (VALUE obj) |
int | rb_objspace_internal_object_p (VALUE obj) |
int | rb_objspace_marked_object_p (VALUE obj) |
int | rb_objspace_garbage_object_p (VALUE obj) |
void | rb_objspace_each_objects (int(*callback)(void *start, void *end, size_t stride, void *data), void *data) |
void | rb_objspace_each_objects_without_setup (int(*callback)(void *, void *, size_t, void *), void *data) |
Variables | |
RUBY_EXTERN int | ruby_stack_grow_direction |
#define IS_STACK_DIR_UPPER | ( | ) | STACK_DIR_UPPER(1,0) |
#define RUBY_FREE_ENTER | ( | msg | ) |
Definition at line 55 of file gc.h.
Referenced by binding_free(), cont_free(), fiber_free(), rb_iseq_free(), ruby_vm_destruct(), and thread_free().
#define RUBY_FREE_LEAVE | ( | msg | ) |
Definition at line 56 of file gc.h.
Referenced by binding_free(), cont_free(), fiber_free(), rb_iseq_free(), ruby_vm_destruct(), and thread_free().
#define RUBY_FREE_UNLESS_NULL | ( | ptr | ) | if(ptr){ruby_xfree(ptr);(ptr)=NULL;} |
Definition at line 64 of file gc.h.
Referenced by cont_free(), and thread_free().
#define RUBY_GC_INFO if(0)printf |
Definition at line 57 of file gc.h.
Referenced by rb_iseq_mark(), rb_vm_mark(), and thread_free().
#define RUBY_MARK_ENTER | ( | msg | ) |
Definition at line 53 of file gc.h.
Referenced by binding_mark(), cont_mark(), fiber_mark(), inst_mark(), rb_iseq_mark(), rb_thread_mark(), and rb_vm_mark().
#define RUBY_MARK_LEAVE | ( | msg | ) |
Definition at line 54 of file gc.h.
Referenced by binding_mark(), cont_mark(), fiber_mark(), inst_mark(), proc_mark(), rb_iseq_mark(), rb_thread_mark(), and rb_vm_mark().
#define RUBY_MARK_UNLESS_NULL | ( | ptr | ) |
Definition at line 60 of file gc.h.
Referenced by binding_mark(), block_mark(), inst_mark(), rb_iseq_mark(), rb_thread_mark(), and rb_vm_mark().
#define SET_MACHINE_STACK_END | ( | p | ) | rb_gc_set_stack_end(p) |
Definition at line 11 of file gc.h.
Referenced by cont_restore_thread(), cont_save_machine_stack(), Init_Cont(), and ruby_get_stack_grow_direction().
#define STACK_DIR_UPPER | ( | a, | |
b | |||
) | STACK_UPPER(&stack_grow_dir_detection, (a), (b)) |
Definition at line 85 of file gc.h.
Referenced by cont_restore_thread().
#define STACK_GROW_DIR_DETECTION VALUE stack_grow_dir_detection |
Definition at line 84 of file gc.h.
Referenced by cont_restore_thread().
#define stack_growup_p | ( | x | ) |
#define STACK_UPPER | ( | x, | |
a, | |||
b | |||
) | (stack_growup_p(x) ? (a) : (b)) |
Definition at line 77 of file gc.h.
Referenced by cont_restore_thread(), ruby_cleanup(), and ruby_stack_length().
NOINLINE | ( | void | rb_gc_set_stack_endVALUE **stack_end_p | ) |
Definition at line 9369 of file gc.c.
References obj_info(), obj_type_name(), and rb_special_const_p().
Referenced by check_cref(), check_method_entry(), filter_defined_class(), rb_vm_env_write(), and vm_stackoverflow().
void rb_obj_info_dump | ( | VALUE | obj | ) |
Definition at line 9380 of file gc.c.
References argc, argv, GET_HEAP_MARK_BITS, heap_eden, is_lazy_sweeping, is_pointer_to_heap(), is_swept_object(), MARKED_IN_BITMAP, Qnil, RANY, RARRAY_LEN, rb_ary_cat(), rb_ary_delete_same(), rb_ary_tmp_new(), rb_define_finalizer(), rb_gcdebug_print_obj_condition(), rb_objspace, rb_proc_new(), rb_raw_obj_info(), RVALUE_OLD_P(), RVALUE_REMEMBERED(), RVALUE_WB_UNPROTECTED(), and stress_to_class.
Referenced by ibf_dump_object_class(), ibf_dump_object_unsupported(), and rb_class_clear_method_cache().
RUBY_SYMBOL_EXPORT_BEGIN size_t rb_objspace_data_type_memsize | ( | VALUE | obj | ) |
Definition at line 2029 of file gc.c.
References rb_data_type_struct::dsize, rb_data_type_struct::function, RTYPEDDATA_DATA, RTYPEDDATA_P, and RTYPEDDATA_TYPE.
Referenced by obj_memsize_of().
void rb_objspace_each_objects | ( | int(*)(void *start, void *end, size_t stride, void *data) | callback, |
void * | data | ||
) |
void rb_objspace_each_objects_without_setup | ( | int(*)(void *, void *, size_t, void *) | callback, |
void * | data | ||
) |
int rb_objspace_garbage_object_p | ( | VALUE | obj | ) |
Definition at line 3014 of file gc.c.
References is_garbage_object(), and rb_objspace.
Referenced by dsymbol_check(), fstr_update_callback(), and symbols_i().
int rb_objspace_internal_object_p | ( | VALUE | obj | ) |
Definition at line 2494 of file gc.c.
References internal_object_p().
Referenced by reachable_object_from_i(), and reachable_object_from_root_i().
int rb_objspace_markable_object_p | ( | VALUE | obj | ) |
Definition at line 3007 of file gc.c.
References is_live_object(), is_markable_object(), and rb_objspace.
Referenced by reachable_object_from_i(), reachable_object_from_root_i(), and reachable_objects_from().
int rb_objspace_marked_object_p | ( | VALUE | obj | ) |
Definition at line 4404 of file gc.c.
References FALSE, RVALUE_MARKED(), and TRUE.
Definition at line 7521 of file gc.c.
References func, gc_mark_children(), is_markable_object(), POP_MARK_FUNC_DATA, PUSH_MARK_FUNC_DATA, and rb_objspace.
Referenced by dump_object(), gc_mark_roots(), reachable_objects_from(), and verify_internal_consistency_i().
void rb_objspace_reachable_objects_from_root | ( | void(func)(const char *category, VALUE, void *) | , |
void * | data | ||
) |
Definition at line 7549 of file gc.c.
References root_objects_data::category, root_objects_data::data, func, root_objects_data::func, gc_mark_roots(), objspace_xfree(), POP_MARK_FUNC_DATA, PUSH_MARK_FUNC_DATA, rb_objspace, root_objects_from(), and size.
Referenced by objspace_dump_all(), and reachable_objects_from_root().
Definition at line 9219 of file gc.c.
References rb_method_definition_struct::alias_count, ARY_EMBED_P, ARY_SHARED_P, BUILTIN_TYPE, C, rb_method_entry_struct::called_id, rb_method_entry_struct::def, rb_method_entry_struct::defined_class, env, imemo_iseq, imemo_ment, IMEMO_NAME, internal_object_p(), method_type_name(), nd_type, NIL_P, NULL, obj_info(), obj_type_name(), rb_method_entry_struct::owner, RANY, RARRAY_LEN, rb_class_path_cached(), rb_id2name(), rb_obj_is_proc(), rb_objspace_data_type_name(), rb_raw_iseq_info(), rb_raw_obj_info(), RBASIC, RSTRING_PTR, ruby_node_name(), RVALUE_FLAGS_AGE(), RVALUE_MARK_BITMAP, RVALUE_MARKING_BITMAP, RVALUE_UNCOLLECTIBLE_BITMAP, RVALUE_WB_UNPROTECTED_BITMAP, snprintf, SPECIAL_CONST_P, T_ARRAY, T_CLASS, T_DATA, T_IMEMO, T_NODE, T_STRING, rb_method_definition_struct::type, and vm_proc_iseq().
Referenced by rb_obj_info_dump(), rb_raw_obj_info(), and ruby_debug_print_value().
int ruby_get_stack_grow_direction | ( | volatile VALUE * | addr | ) |
Definition at line 3936 of file gc.c.
References SET_MACHINE_STACK_END.
RUBY_EXTERN int ruby_stack_grow_direction |