[DOC] Tweaks for GC.config

This commit is contained in:
BurdetteLamar 2025-08-08 11:19:40 -05:00 committed by Peter Zhu
parent 62b5fe8984
commit ad14632095

17
gc.rb
View file

@ -260,11 +260,12 @@ module GC
# GC.config -> hash # GC.config -> hash
# GC.config(hash_to_merge) -> merged_hash # GC.config(hash_to_merge) -> merged_hash
# #
# This method is expected to be defined, useful, and well-behaved # This method is implementation-specific to CRuby.
# only in the CRuby implementation.
# #
# Sets or gets information about the current \GC configuration. # Sets or gets information about the current \GC configuration.
# #
# Configuration parameters are \GC implementation-specific and may change without notice.
#
# With no argument given, returns a hash containing the configuration: # With no argument given, returns a hash containing the configuration:
# #
# GC.config # GC.config
@ -302,13 +303,13 @@ module GC
# Controls whether the \GC is allowed to run a full mark (young & old objects): # Controls whether the \GC is allowed to run a full mark (young & old objects):
# #
# - +true+ (default): \GC interleaves major and minor collections. # - +true+ (default): \GC interleaves major and minor collections.
# - +false+: \GC does not initiate a full marking cycle unless # A flag is set to notify GC that a full mark has been requested.
# explicitly directed by user code; # This flag is accessible via GC.latest_gc_info(:need_major_by).
# - +false+: \GC does not initiate a full marking cycle unless explicitly directed by user code;
# see GC.start. # see GC.start.
# # Setting this parameter to +false+ disables young-to-old promotion.
# Setting this parameter to +false+ disables young-to-old promotion . # For performance reasons, we recommended warming up the application using Process.warmup
# For performance reasons, we recommended warming up the application using Process.warmup # before setting this parameter to +false+.
# before setting this parameter to +false+.
# #
def self.config hash = nil def self.config hash = nil
return Primitive.gc_config_get unless hash return Primitive.gc_config_get unless hash