Login
Task S.8a: a fixed arena for the program tree
Login

Branch: slice/S.8a. Commit only there; never to trunk.

Read first:

Claim. S.8's program tree lives in a fixed arena of small nodes that needs no heap, so its RAM cost is a number known at compile time.

Passage. S.8's own finding: "Glint's heap (3.4) takes whole 4 KiB pages, a quarter of the Zepto's RAM each. The tree needs a fixed arena that is emptied after each line or after emit, with a stated node limit."

Make: src/glint/shell/tree.cr, module Glint::Shell::Tree.

spec/shell/tree_spec.cr checks:

Constraints. No Array, Hash, String building, Pointer.malloc, classes, exceptions or constants of StaticArray. Nothing in the image requires it yet, so image sizes are unchanged. crystal tool format --check passes. Report the line counts.