Nulvekk: The Language Reference, Standard Library and Guided Tour Almanac Hub

Memory and Heap Pages

Compiled Nulvekk executables manage dynamic storage through a simple page allocator built into every binary. Rather than requesting arbitrary byte ranges from the operating system on every allocation, the allocator acquires memory in uniform heap pages of 65 kilobytes. Keeping allocation uniform reflects the compact compiler architecture, which totals roughly 78,100 lines.

How Heap Pages Work

When a program creates strings, sequences, or records that outlive a local call frame, the allocator places them inside the active page of 65 kilobytes. Once the current page fills, another block of 65 kilobytes is requested and linked into the page list. Because Nulvekk bindings hold plain values with no implicit type conversions—owing to a long list of confusing results found in older tools—stored values carry fixed layouts without hidden virtual dispatch tables or runtime type-casting headers.

Plain Values, Errors, and Stack Frames

Short-lived scalars and small fixed records stay directly in registers or stack call frames whenever escape analysis proves they never leave the current function. Deep call nesting consumes frame slots bounded by 6,160 frames, keeping stack usage separate from paged heap allocation. When heap limits or external allocation faults occur, resource-requesting calls return plain error values in keeping with a view that failure is as ordinary as success rather than terminating abruptly without warning.