Ruby: rb_objspace Struct Reference

Ruby 3.4.3p32 (2025-04-14 revision d0b7e5b6a04bde21ca483d20a1546b28b401c2d4)

Data Structures | Data Fields
rb_objspace Struct Reference

## Data Structures
struct | rb_gc_config

## Data Fields
struct { |
size_t limit |
size_t increase |
} | malloc_params |
struct rb_objspace::rb_gc_config | gc_config
struct { |
unsigned int mode: 2 |
unsigned int immediate_sweep: 1 |
unsigned int dont_gc: 1 |
unsigned int dont_incremental: 1 |
unsigned int during_gc: 1 |
unsigned int during_compacting: 1 |
unsigned int during_reference_updating: 1 |
unsigned int gc_stressful: 1 |
unsigned int has_newobj_hook: 1 |
unsigned int during_minor_gc: 1 |
unsigned int during_incremental_marking: 1 |
unsigned int measure_gc: 1 |
} | flags |
rb_event_flag_t | hook_events
unsigned long long | next_object_id
rb_heap_t | heaps [HEAP_COUNT]
size_t | empty_pages_count
struct heap_page * | empty_pages
struct { |
rb_atomic_t finalizing |
} | atomic_flags |
mark_stack_t | mark_stack
size_t | marked_slots
struct { |
} | heap_pages |
st_table * | finalizer_table
struct { |
int run |
unsigned int latest_gc_info |
gc_profile_record * records |
gc_profile_record * current_record |
size_t next_index |
size_t size |
double invoke_time |
size_t minor_gc_count |
size_t major_gc_count |
size_t compact_count |
size_t read_barrier_faults |
double gc_sweep_start_time |
size_t total_allocated_objects_at_gc_start |
size_t heap_used_at_gc_start |
size_t count |
unsigned long long marking_time_ns |
struct timespec marking_start_time |
unsigned long long sweeping_time_ns |
struct timespec sweeping_start_time |
size_t weak_references_count |
size_t retained_weak_references_count |
} | profile |
VALUE | gc_stress_mode
struct { |
VALUE parent_object |
int need_major_gc |
size_t last_major_gc |
size_t uncollectible_wb_unprotected_objects |
size_t uncollectible_wb_unprotected_objects_limit |
size_t old_objects |
size_t old_objects_limit |
} | rgengc |
struct { |
size_t considered_count_table [T_MASK] |
size_t moved_count_table [T_MASK] |
size_t moved_up_count_table [T_MASK] |
size_t moved_down_count_table [T_MASK] |
size_t total_moved |
gc_compact_compare_func compare_func |
} | rcompactor |
struct { |
size_t pooled_slots |
size_t step_slots |
} | rincgc |
st_table * | id_to_obj_tbl
st_table * | obj_to_id_tbl

## Detailed Description

Definition at line 445 of file default.c.

## Field Documentation

## ◆ compact_count

size_t rb_objspace::compact_count

Definition at line 519 of file default.c.

## ◆ compare_func

gc_compact_compare_func rb_objspace::compare_func

Definition at line 586 of file default.c.

## ◆ considered_count_table

size_t rb_objspace::considered_count_table[T_MASK]

Definition at line 579 of file default.c.

## ◆ count

size_t rb_objspace::count

Definition at line 545 of file default.c.

## ◆ current_record

gc_profile_record* rb_objspace::current_record

Definition at line 508 of file default.c.

## ◆ dont_gc

unsigned int rb_objspace::dont_gc

Definition at line 462 of file default.c.

## ◆ dont_incremental

unsigned int rb_objspace::dont_incremental

Definition at line 463 of file default.c.

## ◆ during_compacting

unsigned int rb_objspace::during_compacting

Definition at line 465 of file default.c.

## ◆ during_gc

unsigned int rb_objspace::during_gc

Definition at line 464 of file default.c.

## ◆ during_incremental_marking

unsigned int rb_objspace::during_incremental_marking

Definition at line 470 of file default.c.

## ◆ during_minor_gc

unsigned int rb_objspace::during_minor_gc

Definition at line 469 of file default.c.

## ◆ during_reference_updating

unsigned int rb_objspace::during_reference_updating

Definition at line 466 of file default.c.

## ◆ empty_pages

struct heap_page* rb_objspace::empty_pages

Definition at line 479 of file default.c.

## ◆ empty_pages_count

size_t rb_objspace::empty_pages_count

Definition at line 478 of file default.c.

## ◆ finalizer_table

st_table* rb_objspace::finalizer_table

Definition at line 502 of file default.c.

## ◆ finalizing

rb_atomic_t rb_objspace::finalizing

Definition at line 482 of file default.c.

## ◆ gc_stress_mode

VALUE rb_objspace::gc_stress_mode

Definition at line 556 of file default.c.

## ◆ gc_stressful

unsigned int rb_objspace::gc_stressful

Definition at line 467 of file default.c.

## ◆ gc_sweep_start_time

double rb_objspace::gc_sweep_start_time

Definition at line 540 of file default.c.

## ◆ has_newobj_hook

unsigned int rb_objspace::has_newobj_hook

Definition at line 468 of file default.c.

## ◆ heap_used_at_gc_start

size_t rb_objspace::heap_used_at_gc_start

Definition at line 542 of file default.c.

## ◆ heaps

rb_heap_t rb_objspace::heaps[HEAP_COUNT]

Definition at line 477 of file default.c.

## ◆ hook_events

rb_event_flag_t rb_objspace::hook_events

Definition at line 474 of file default.c.

## ◆ id_to_obj_tbl

st_table* rb_objspace::id_to_obj_tbl

Definition at line 594 of file default.c.

## ◆ immediate_sweep

unsigned int rb_objspace::immediate_sweep

Definition at line 461 of file default.c.

## ◆ increase

size_t rb_objspace::increase

Definition at line 448 of file default.c.

## ◆ invoke_time

double rb_objspace::invoke_time

Definition at line 515 of file default.c.

## ◆ last_major_gc

size_t rb_objspace::last_major_gc

Definition at line 561 of file default.c.

## ◆ latest_gc_info

unsigned int rb_objspace::latest_gc_info

Definition at line 506 of file default.c.

## ◆ limit

size_t rb_objspace::limit

Definition at line 447 of file default.c.

## ◆ major_gc_count

size_t rb_objspace::major_gc_count

Definition at line 518 of file default.c.

## ◆ mark_stack

mark_stack_t rb_objspace::mark_stack

Definition at line 485 of file default.c.

## ◆ marked_slots

size_t rb_objspace::marked_slots

Definition at line 486 of file default.c.

## ◆ marking_start_time

struct timespec rb_objspace::marking_start_time

Definition at line 547 of file default.c.

## ◆ marking_time_ns

unsigned long long rb_objspace::marking_time_ns

Definition at line 546 of file default.c.

## ◆ measure_gc

unsigned int rb_objspace::measure_gc

Definition at line 471 of file default.c.

## ◆ minor_gc_count

size_t rb_objspace::minor_gc_count

Definition at line 517 of file default.c.

## ◆ mode

unsigned int rb_objspace::mode

Definition at line 460 of file default.c.

## ◆ moved_count_table

size_t rb_objspace::moved_count_table[T_MASK]

Definition at line 580 of file default.c.

## ◆ moved_down_count_table

size_t rb_objspace::moved_down_count_table[T_MASK]

Definition at line 582 of file default.c.

## ◆ moved_up_count_table

size_t rb_objspace::moved_up_count_table[T_MASK]

Definition at line 581 of file default.c.

## ◆ need_major_gc

int rb_objspace::need_major_gc

Definition at line 560 of file default.c.

## ◆ next_index

size_t rb_objspace::next_index

Definition at line 509 of file default.c.

## ◆ next_object_id

unsigned long long rb_objspace::next_object_id

Definition at line 475 of file default.c.

## ◆ obj_to_id_tbl

st_table* rb_objspace::obj_to_id_tbl

Definition at line 595 of file default.c.

## ◆ old_objects

size_t rb_objspace::old_objects

Definition at line 564 of file default.c.

## ◆ old_objects_limit

size_t rb_objspace::old_objects_limit

Definition at line 565 of file default.c.

## ◆ parent_object

VALUE rb_objspace::parent_object

Definition at line 559 of file default.c.

## ◆ pooled_slots

size_t rb_objspace::pooled_slots

Definition at line 590 of file default.c.

## ◆ read_barrier_faults

size_t rb_objspace::read_barrier_faults

Definition at line 520 of file default.c.

## ◆ records

gc_profile_record* rb_objspace::records

Definition at line 507 of file default.c.

## ◆ retained_weak_references_count

size_t rb_objspace::retained_weak_references_count

Definition at line 553 of file default.c.

## ◆ run

int rb_objspace::run

Definition at line 505 of file default.c.

## ◆ size

size_t rb_objspace::size

Definition at line 510 of file default.c.

## ◆ step_slots

size_t rb_objspace::step_slots

Definition at line 591 of file default.c.

## ◆ sweeping_start_time

struct timespec rb_objspace::sweeping_start_time

Definition at line 549 of file default.c.

## ◆ sweeping_time_ns

unsigned long long rb_objspace::sweeping_time_ns

Definition at line 548 of file default.c.

## ◆ total_allocated_objects_at_gc_start

size_t rb_objspace::total_allocated_objects_at_gc_start

Definition at line 541 of file default.c.

## ◆ total_moved

size_t rb_objspace::total_moved

Definition at line 583 of file default.c.

## ◆ uncollectible_wb_unprotected_objects

size_t rb_objspace::uncollectible_wb_unprotected_objects

Definition at line 562 of file default.c.

## ◆ uncollectible_wb_unprotected_objects_limit

size_t rb_objspace::uncollectible_wb_unprotected_objects_limit

Definition at line 563 of file default.c.

## ◆ weak_references_count

size_t rb_objspace::weak_references_count

Definition at line 552 of file default.c.

The documentation for this struct was generated from the following file:

- gc/default/default.c