diff options
| author | Matt Valentine-House <matt@eightbitraptor.com> | 2026-02-03 13:51:35 -0500 |
|---|---|---|
| committer | Matt Valentine-House <matt@eightbitraptor.com> | 2026-02-13 14:29:14 +0000 |
| commit | 5c71c8c55bd71cff64e670097e4800d9e3d67ae4 (patch) | |
| tree | 97659aac5f5ff20ab3de00db1ff87aea850d1155 /doc/transcode.rb | |
| parent | c9a49411dcfa6ac42d15ce33858207cb4b11025e (diff) | |
gc: implement slot-based bitmap indexing with division magic
Replace the BASE_SLOT_SIZE-granularity bitmap scheme with slot-based
indexing where each bit represents one slot regardless of size.
Key changes:
- Add slot_div_magic field to heap_page for fast division
- Use Go-inspired formula: slot_index = (offset * div_magic) >> 32
- Update all bitmap iteration to use one-bit-per-slot scheme
- Remove slot_bits_mask from rb_heap_t (no longer needed)
This enables arbitrary slot sizes (not just power-of-two multiples of
BASE_SLOT_SIZE) by decoupling bitmap indexing from slot size.
Functions updated:
- gc_sweep_plane/gc_sweep_page
- rgengc_rememberset_mark/rgengc_rememberset_mark_plane
- gc_marks_wb_unprotected_objects/gc_marks_wb_unprotected_objects_plane
- gc_compact_plane/gc_compact_page
- invalidate_moved_plane/invalidate_moved_page
- RVALUE_AGE_GET/RVALUE_AGE_SET_BITMAP
Inspired by Go runtime's mbitmap.go divideByElemSize().
Diffstat (limited to 'doc/transcode.rb')
0 files changed, 0 insertions, 0 deletions
