Squeezing the BEAM into 16MB
summary
Porting the full BEAM + OTP to a GRiSP nano on RTEMS with only 16MB RAM target and 3MB CPU-internal RAM is a work in progress but shows concrete wins: compiler-size flags and linker tricks shrink beam.bin from ~8.5MB to <3MB, enabling many more modules (initially 7 modules, then ~+45 after tweaks). Techniques used: allocator instrumentation, LL allocator, per-module GC runs (oddly disabling GC gained two modules), moving block storage into internal RAM, and trimming LwIP; Unicode (≈0.5MB) and bootloader contiguous-load limits still block a full shell.
AI-written summary · about
chapters (16)
- 0:00Memory constrained BEAM intro
- 1:27Hardware design goals
- 4:14RAM limited to 16MB
- 8:11Crunch week contributions
- 8:55Memory allocator challenges
- 12:09Optimizing BEAM binary size
- 13:32Garbage collection impact
- 14:34Allocator optimizations
- 16:00BEAM booting on 16MB RAM
- 19:35Results of optimizations
- 21:01Unicode module hurdle
- 22:05Allocator evolution insights
- 23:31Energy-aware booting next
- 25:19Project progress curve
- 26:03Grispio platform future
- 27:08Q&A
related talks
27mFreestanding Erlang Porting BEAM close to the metal.
50mGrisp: Building Space Ships With Erlang
01h 07mInside memory management on the BEAM
26mseL4 and BEAM: A match made in Erlang
48mGetting to Know the Erlang Virtual Machine, the BEAM
19mErlang/OTP Update
56mEnhanced Embedded Systems with Nerves
25mMicrocontrollers with Gleam
