diff options
author | Peter Zhu <peter@peterzhu.ca> | 2024-01-07 14:26:10 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2024-01-10 09:46:19 -0500 |
commit | 8940922d1889f885d4f26b4c815beb136a9a2095 (patch) | |
tree | e3983f12dba2e448728caf58489905caf0263edd /gc.c | |
parent | 31371b2e24b03ccb0a03b622faf8c65e6cf6a31a (diff) |
[DOC] Improve doc for GC.latest_compact_info
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -11002,11 +11002,19 @@ gc_update_references(rb_objspace_t *objspace) * * Returns information about object moved in the most recent \GC compaction. * - * The returned hash has two keys :considered and :moved. The hash for - * :considered lists the number of objects that were considered for movement - * by the compactor, and the :moved hash lists the number of objects that - * were actually moved. Some objects can't be moved (maybe they were pinned) - * so these numbers can be used to calculate compaction efficiency. + * The returned +hash+ has the following keys: + * + * - +:considered+: a hash containing the type of the object as the key and + * the number of objects of that type that were considered for movement. + * - +:moved+: a hash containing the type of the object as the key and the + * number of objects of that type that were actually moved. + * - +:moved_up+: a hash containing the type of the object as the key and the + * number of objects of that type that were increased in size. + * - +:moved_down+: a hash containing the type of the object as the key and + * the number of objects of that type that were decreased in size. + * + * Some objects can't be moved (due to pinning) so these numbers can be used to + * calculate compaction efficiency. */ static VALUE gc_compact_stats(VALUE self) |