diff options
-rw-r--r-- | gc.rb | 56 |
1 files changed, 51 insertions, 5 deletions
@@ -31,11 +31,32 @@ module GC # are not guaranteed to be future-compatible, and may be ignored if the # underlying implementation does not support them. def self.start full_mark: true, immediate_mark: true, immediate_sweep: true - Primitive.gc_start_internal full_mark, immediate_mark, immediate_sweep end def garbage_collect full_mark: true, immediate_mark: true, immediate_sweep: true - Primitive.gc_start_internal full_mark, immediate_mark, immediate_sweep end # call-seq: @@ -163,8 +184,23 @@ module GC Primitive.gc_latest_gc_info hash_or_key end def self.compact - Primitive.rb_gc_compact end # call-seq: @@ -182,13 +218,23 @@ module GC # object, that object should be pushed on the mark stack, and will # make a SEGV. def self.verify_compaction_references(toward: nil, double_heap: false) - Primitive.gc_verify_compaction_references(toward, double_heap) end end module ObjectSpace def garbage_collect full_mark: true, immediate_mark: true, immediate_sweep: true - Primitive.gc_start_internal full_mark, immediate_mark, immediate_sweep end module_function :garbage_collect |