[DOC] Make sure new GC methods are documented

This commit is contained in:
zverok 2021-12-20 09:20:55 +02:00 committed by Koichi Sasada
parent b0ad6cb371
commit cf83ba1da7
Notes: git 2021-12-24 10:36:48 +09:00

9
gc.rb
View File

@ -257,13 +257,12 @@ module GC
Primitive.gc_verify_compaction_references(double_heap, toward == :empty) Primitive.gc_verify_compaction_references(double_heap, toward == :empty)
end end
# :nodoc:
# call-seq: # call-seq:
# GC.using_rvargc? -> true or false # GC.using_rvargc? -> true or false
# #
# Returns true if using experimental feature Variable Width Allocation, false # Returns true if using experimental feature Variable Width Allocation, false
# otherwise. # otherwise.
def self.using_rvargc? def self.using_rvargc? # :nodoc:
GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] > 1 GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] > 1
end end
@ -272,8 +271,8 @@ module GC
# GC.measure_total_time = true/false # GC.measure_total_time = true/false
# #
# Enable to measure GC time. # Enable to measure GC time.
# You can get the result with `GC.stat(:time)`. # You can get the result with <tt>GC.stat(:time)</tt>.
# Note that the GC time measurement can introduce the performance regression. # Note that GC time measurement can cause some performance overhead.
def self.measure_total_time=(flag) def self.measure_total_time=(flag)
Primitive.cstmt! %{ Primitive.cstmt! %{
rb_objspace.flags.measure_gc = RTEST(flag) ? TRUE : FALSE; rb_objspace.flags.measure_gc = RTEST(flag) ? TRUE : FALSE;
@ -284,7 +283,7 @@ module GC
# call-seq: # call-seq:
# GC.measure_total_time -> true/false # GC.measure_total_time -> true/false
# #
# Return measure_total_time flag (default: true). # Return measure_total_time flag (default: +true+).
# Note that measurement can affect the application performance. # Note that measurement can affect the application performance.
def self.measure_total_time def self.measure_total_time
Primitive.cexpr! %{ Primitive.cexpr! %{