End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
GC.latest_gc_info
GC.latest_gc_info → hash
GC.latest_gc_info(hash) → hash
GC.latest_gc_info(:major_by) → :malloc
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/gc.rb, line 231
def self.latest_gc_info hash_or_key = nil
Primitive.gc_latest_gc_info hash_or_key
end
Returns information about the most recent garbage collection.
If the optional argument, hash, is given, it is overwritten and returned. This is intended to avoid probe effect.
Ruby version changes
-
3.2
-
Expose
need_major_gcviaGC.latest_gc_info. GH-6791
-
See also
.latest_compact_info
.malloc_allocated_size
.enable
.malloc_allocations
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0