Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
Internal header for GC. More...
#include "ruby/internal/config.h"
#include <stddef.h>
#include "internal/compilers.h"
#include "ruby/ruby.h"
Go to the source code of this file.
Data Structures | |
struct | ractor_newobj_cache |
Macros | |
#define | USE_RVARGC 0 |
#define | RB_NEWOBJ_OF(var, T, c, f) |
#define | RB_EC_NEWOBJ_OF(ec, var, T, c, f) |
#define | RB_RVARGC_NEWOBJ_OF(var, T, c, f, s) |
#define | NEWOBJ_OF(var, T, c, f) RB_NEWOBJ_OF((var), T, (c), (f)) |
#define | RVARGC_NEWOBJ_OF(var, T, c, f, s) RB_RVARGC_NEWOBJ_OF((var), T, (c), (f), (s)) |
#define | RB_OBJ_GC_FLAGS_MAX 6 /* used in ext/objspace */ |
#define | UNALIGNED_MEMBER_ACCESS(expr) (expr) |
#define | UNALIGNED_MEMBER_PTR(ptr, mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem) |
#define | RB_OBJ_WRITE(a, slot, b) |
#define | SIZED_REALLOC_N(v, T, m, n) ((v) = (T *)ruby_sized_xrealloc2((void *)(v), (m), sizeof(T), (n))) |
#define | ruby_sized_xrealloc ruby_sized_xrealloc_inlined |
#define | ruby_sized_xrealloc2 ruby_sized_xrealloc2_inlined |
#define | ruby_sized_xfree ruby_sized_xfree_inlined |
Typedefs | |
typedef struct ractor_newobj_cache | rb_ractor_newobj_cache_t |
Variables | |
VALUE * | ruby_initial_gc_stress_ptr |
int | ruby_disable_gc |
Internal header for GC.
Definition in file gc.h.
#define NEWOBJ_OF | ( | var, | |
T, | |||
c, | |||
f | |||
) | RB_NEWOBJ_OF((var), T, (c), (f)) |
#define RB_EC_NEWOBJ_OF | ( | ec, | |
var, | |||
T, | |||
c, | |||
f | |||
) |
#define RB_NEWOBJ_OF | ( | var, | |
T, | |||
c, | |||
f | |||
) |
#define RB_OBJ_WRITE | ( | a, | |
slot, | |||
b | |||
) |
#define RB_RVARGC_NEWOBJ_OF | ( | var, | |
T, | |||
c, | |||
f, | |||
s | |||
) |
#define RVARGC_NEWOBJ_OF | ( | var, | |
T, | |||
c, | |||
f, | |||
s | |||
) | RB_RVARGC_NEWOBJ_OF((var), T, (c), (f), (s)) |
#define SIZED_REALLOC_N | ( | v, | |
T, | |||
m, | |||
n | |||
) | ((v) = (T *)ruby_sized_xrealloc2((void *)(v), (m), sizeof(T), (n))) |
#define UNALIGNED_MEMBER_PTR | ( | ptr, | |
mem | |||
) | UNALIGNED_MEMBER_ACCESS(&(ptr)->mem) |
typedef struct ractor_newobj_cache rb_ractor_newobj_cache_t |
__attribute__ | ( | (__alloc_align__(1)) | ) |
Definition at line 2727 of file gc.c.
References heap_page::flags, RCLASS_IV_INDEX_TBL, ROBJECT_EMBED, and T_OBJECT.
Definition at line 8660 of file gc.c.
References rb_objspace.
int rb_ec_stack_check | ( | struct rb_execution_context_struct * | ec | ) |
VALUE rb_ec_wb_protected_newobj_of | ( | struct rb_execution_context_struct * | ec, |
VALUE | klass, | ||
VALUE | flags, | ||
size_t | |||
) |
Definition at line 2590 of file gc.c.
References FL_WB_PROTECTED, heap_page::flags, GC_ASSERT, and size.
Definition at line 6292 of file gc.c.
References rb_objspace.
Definition at line 6315 of file gc.c.
References rb_objspace.
Referenced by rb_execution_context_mark().
void rb_gc_ractor_newobj_cache_clear | ( | rb_ractor_newobj_cache_t * | newobj_cache | ) |
Definition at line 8721 of file gc.c.
References ractor_newobj_cache::using_page.
void* rb_gc_rvargc_object_data | ( | VALUE | obj | ) |
void rb_gc_writebarrier_remember | ( | VALUE | obj | ) |
Definition at line 8598 of file gc.c.
References gc_report, and rb_objspace.
VALUE rb_objspace_gc_disable | ( | struct rb_objspace * | ) |
Definition at line 10763 of file gc.c.
Referenced by rb_gc_disable().
VALUE rb_objspace_gc_enable | ( | struct rb_objspace * | ) |
Definition at line 10726 of file gc.c.
References dont_gc_off, dont_gc_val, and RBOOL.
Referenced by rb_gc_enable().
void rb_objspace_set_event_hook | ( | const rb_event_flag_t | event | ) |
Definition at line 2202 of file gc.c.
References rb_objspace::flags, rb_objspace::has_hook, rb_objspace::hook_events, rb_objspace, and RUBY_INTERNAL_EVENT_OBJSPACE_MASK.
size_t rb_size_mul_add_or_raise | ( | size_t | , |
size_t | , | ||
size_t | , | ||
VALUE | |||
) |
Definition at line 2582 of file gc.c.
References FL_WB_PROTECTED, heap_page::flags, GC_ASSERT, and size.
Definition at line 2574 of file gc.c.
References FL_WB_PROTECTED, heap_page::flags, GC_ASSERT, and size.
RUBY_ATTR_MALLOC void* rb_xcalloc_mul_add_mul | ( | size_t | , |
size_t | , | ||
size_t | , | ||
size_t | |||
) |
RUBY_ATTR_MALLOC void* rb_xmalloc_mul_add | ( | size_t | , |
size_t | , | ||
size_t | |||
) |
RUBY_ATTR_MALLOC void* rb_xmalloc_mul_add_mul | ( | size_t | , |
size_t | , | ||
size_t | , | ||
size_t | |||
) |
void* rb_xrealloc_mul_add | ( | const void * | , |
size_t | , | ||
size_t | , | ||
size_t | |||
) |
size_t RUBY_ATTR_ALLOC_SIZE | ( | (2) | ) |
RUBY_ATTR_MALLOC void* ruby_mimmalloc | ( | size_t | size | ) |
Definition at line 11842 of file gc.c.
References malloc, NULL, size, and malloc_obj_info::size.
Referenced by Init_BareVM(), rb_ractor_main_alloc(), and rb_threadptr_root_fiber_setup().
void void ruby_sized_xfree | ( | void * | x, |
size_t | size | ||
) |
Definition at line 11797 of file gc.c.
Referenced by ruby_xfree().
void* ruby_sized_xrealloc | ( | void * | ptr, |
size_t | new_size, | ||
size_t | old_size | ||
) |
Definition at line 11762 of file gc.c.
Referenced by ruby_xrealloc_body().
void* ruby_sized_xrealloc2 | ( | void * | ptr, |
size_t | new_count, | ||
size_t | element_size, | ||
size_t | old_count | ||
) |
VALUE* ruby_initial_gc_stress_ptr |
Definition at line 946 of file gc.c.
Referenced by ruby_env_debug_option().