diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-08-14 14:06:03 -0400 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-08-15 08:54:27 -0400 |
commit | 01f74b28521069e2582fbd751c34b115fe033a2b (patch) | |
tree | e406216a747f79212d7a50a3b13a7046e71b663b /gc.rb | |
parent | 2498140777020808a007691516e7bf8d8d862215 (diff) | |
download | ruby-01f74b28521069e2582fbd751c34b115fe033a2b.tar.gz |
[DOC] Improve docs about keys in GC.stat_heap
Diffstat (limited to 'gc.rb')
-rw-r--r-- | gc.rb | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -219,6 +219,33 @@ module GC # If the optional argument, hash, is given, it is overwritten and returned. # # This method is only expected to work on CRuby. + # + # The hash includes the following keys about the internal information in + # the \GC: + # + # [slot_size] + # The slot size of the heap in bytes. + # [heap_allocatable_pages] + # The number of pages that can be allocated without triggering a new + # garbage collection cycle. + # [heap_eden_pages] + # The number of pages in the eden heap. + # [heap_eden_slots] + # The total number of slots in all of the pages in the eden heap. + # [heap_tomb_pages] + # The number of pages in the tomb heap. The tomb heap only contains pages + # that do not have any live objects. + # [heap_tomb_slots] + # The total number of slots in all of the pages in the tomb heap. + # [total_allocated_pages] + # The total number of pages that have been allocated in the heap. + # [total_freed_pages] + # The total number of pages that have been freed and released back to the + # system in the heap. + # [force_major_gc_count] + # The number of times major garbage collection cycles this size pool has + # forced to start due to running out of free slots. + # def self.stat_heap heap_name = nil, hash_or_key = nil Primitive.gc_stat_heap heap_name, hash_or_key end |