Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
GC.verify_compaction_references
GC.verify_compaction_references(toward: nil, double_heap: false) → hash
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/gc.rb, line 285
def self.verify_compaction_references(toward: nil, double_heap: false, expand_heap: false)
Primitive.gc_verify_compaction_references(double_heap, expand_heap, toward == :empty)
end
Verify compaction reference consistency.
This method is implementation specific. During compaction, objects that were moved are replaced with T_MOVED objects. No object should have a reference to a T_MOVED object after compaction.
This function expands the heap to ensure room to move all objects, compacts the heap to make sure everything moves, updates all references, then performs a full GC. If any object contains a reference to a T_MOVED object, that object should be pushed on the mark stack, and will make a SEGV.
See also
.total_time
.verify_internal_consistency
.stress=
#garbage_collect
also in
4.1 · 3.2 · 3.1 · 3.0