Static Allocation with Zig

Over the past few months I’ve been chipping away at a small Redis-compatible key/value server called kv. The goal is to have something (mostly) production-ready, while implementing only a small subset of commands. The world doesn’t necessarily need another key/value store, I’m just interested in implementing it in Zig and learning about some new (to me) techniques for systems programming. One of those techniques is static memory allocation during initialization. The idea here is that all memory is requested and allocated from the OS at startup, and held until termination. I first heard about this while learning about TigerBeetle, and they reference it explicitly in their development style guide dubbed “TigerStyle”. All memory must be statically allocated at startup. No memory may be…

Read more on Hacker News