Join Nostr
2026-10-16 04:39:34 UTC
in reply to

Thalia Archibald on Nostr: But why does form/fed implement an allocator? Now, we'd just load all the key/value ...

But why does form/fed implement an allocator? Now, we'd just load all the key/value pairs into memory, process, and dump, especially for a database so small. But memory was expensive and the PDP-11/20 had only 56KB.

Instead, it uses a file as the backing store and reads 512-byte blocks on demand, caching up to four of them, and flushing when evicted. It implements a buddy allocator with a full suite of functions, including coalescing and resizing. This was well before the standard library started to take form, so it was all bespoke to form/fed.

4/6