Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Topics Languages

Ruby

2026

2024

2023

2022

Optimizing Ruby’s Memory Layout: Variable Width Allocation

Deep dive 13 min +130 XP

Ruby 3.2's Variable Width Allocation replaces CRuby's single 40-byte RVALUE slot with five size pools (40, 80, 160, 320 and 640 bytes) so classes, strings, arrays and objects can store their data adjacent to the object instead of in separate malloc'd memory.

The quest for software engineering knowledge.

Look:
Layout: