diff options
author | Peter Zhu <[email protected]> | 2023-08-14 14:04:55 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-08-15 08:54:27 -0400 |
commit | 2498140777020808a007691516e7bf8d8d862215 () | |
tree | d198d62e62e34e48dc4cd225c3c18a3306640f59 | |
parent | 300bc145892488b91f10438f06fe75d03809424c (diff) |
[DOC] Improve docs for GC.start
Notes: Merged: https://.com/ruby/ruby/pull/8219
-rw-r--r-- | gc.rb | 45 |
1 files changed, 25 insertions, 20 deletions
@@ -10,26 +10,31 @@ # GC::Profiler. module GC - # call-seq: - # GC.start -> nil - # ObjectSpace.garbage_collect -> nil - # include GC; garbage_collect -> nil - # GC.start(full_mark: true, immediate_sweep: true) -> nil - # ObjectSpace.garbage_collect(full_mark: true, immediate_sweep: true) -> nil - # include GC; garbage_collect(full_mark: true, immediate_sweep: true) -> nil - # - # Initiates garbage collection, even if manually disabled. - # - # This method is defined with keyword arguments that default to true: - # - # def GC.start(full_mark: true, immediate_sweep: true); end - # - # Use full_mark: false to perform a minor \GC. - # Use immediate_sweep: false to defer sweeping (use lazy sweep). - # - # Note: These keyword arguments are implementation and version dependent. They - # 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, false end |