Commit graph

11 commits

Author SHA1 Message Date
Peter Zhu
74887a2c12 [ruby/mmtk] Skip weak references that are special consts
If a reference marked weak becomes a special const, it will crash because
it is not a GC handled object. We should skip special consts here.

870a79426b
2025-07-30 13:26:19 +00:00
Jean Boussier
f48e45d1e9 Move object_id in object fields.
And get rid of the `obj_to_id_tbl`

It's no longer needed, the `object_id` is now stored inline
in the object alongside instance variables.

We still need the inverse table in case `_id2ref` is invoked, but
we lazily build it by walking the heap if that happens.

The `object_id` concern is also no longer a GC implementation
concern, but a generic implementation.

Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
2025-05-08 07:58:05 +02:00
Kunshan Wang
d17ab5a430 [ruby/mmtk] Do root scanning in scan_vm_specific_roots
We rely on scan_vm_specific_roots to reach all stacks via the following
path:

    VM -> ractors -> threads -> fibers -> stacks

0a6a835aaa
2025-04-08 03:12:50 +00:00
Kunshan Wang
aa7b5e2df4 [ruby/mmtk] Trigger forced GC in GC.start
We now use `MMTK::handle_user_collection_request(true, ...)` to force
triggering a GC instead of enabling GC temporarily.

02ef47f818
2025-02-24 23:30:00 +00:00
Peter Zhu
5fceba6614 [ruby/mmtk] Add mmtk_heap_max to GC.config
6a78ffaf16
2025-01-17 15:44:24 +00:00
Peter Zhu
179899c616 [ruby/mmtk] Add mmtk_heap_min to GC.config
5bbac70c69
2025-01-16 21:40:31 +00:00
Peter Zhu
2538f4d521 [ruby/mmtk] Add mmtk_heap_mode to GC.config
810f897603
2025-01-16 16:20:04 +00:00
Peter Zhu
ab1565ebe3 [ruby/mmtk] Add mmtk_plan to GC.config
67da9ea5b8
2025-01-15 18:08:03 +00:00
Peter Zhu
e02c7491e9 [ruby/mmtk] Fix mmtk.h
dbb4036be9
2025-01-15 17:55:32 +00:00
Peter Zhu
f1e32914eb [ruby/mmtk] Add mmtk_worker_count to GC.config
836a9059cb
2025-01-14 20:59:39 +00:00
Peter Zhu
770ca58cd3 [ruby/mmtk] Use extconf.rb for external GC compilation
This commit adds extconf.rb for both the default GC and and MMTk to build
the external GC. This allows common.mk to not need to contain any
implementation-specific build configuration.

db6a29b4a9
2024-11-22 09:55:25 +00:00
Renamed from gc/mmtk.h (Browse further)