summaryrefslogtreecommitdiff
path: root/gc/mmtk/mmtk.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2025-01-14 15:59:35 -0500
committergit <[email protected]>2025-01-14 20:59:39 +0000
commitf1e32914eb40737de0f639146aebaf6e3ce2bf21 (patch)
tree7441b6d8e069241875625d69ee0209e41435021a /gc/mmtk/mmtk.c
parent56242ba495246e95dd5178f2ec101c1005c10afc (diff)
[ruby/mmtk] Add mmtk_worker_count to GC.config
https://github.com/ruby/mmtk/commit/836a9059cb
Diffstat (limited to 'gc/mmtk/mmtk.c')
-rw-r--r--gc/mmtk/mmtk.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gc/mmtk/mmtk.c b/gc/mmtk/mmtk.c
index 4e964a6add..cc57d6dfae 100644
--- a/gc/mmtk/mmtk.c
+++ b/gc/mmtk/mmtk.c
@@ -630,8 +630,11 @@ rb_gc_impl_stress_get(void *objspace_ptr)
VALUE
rb_gc_impl_config_get(void *objspace_ptr)
{
- // TODO
- return rb_hash_new();
+ VALUE hash = rb_hash_new();
+
+ rb_hash_aset(hash, ID2SYM(rb_intern_const("mmtk_worker_count")), RB_ULONG2NUM(mmtk_worker_count()));
+
+ return hash;
}
void