<- Back
Comments (42)
- eatonphilHey folks, this is my project. I really liked OxCaml's zero_alloc feature [0], something you don't get in Rust or Zig or Go*, and have been trying to get a handle on allocations in The Consensus's code search engine.It's an extremely early project but it's been helping me out a bunch already. Would love to hear your bug reports or requests if you try running it on your codebase.[0] https://theconsensus.dev/p/2026/06/27/the-feature-in-oxcaml-...* I think you can get this in Clang and maybe GCC with `__attribute__((nonallocating))` though.
- andrewlaThe end state of every garbage collected language is a suite of tools to prevent garbage collection at all costs.I think we can learn something here.
- gritzkoIf you don't allocate, why do you even need Go or Rust? LLMs handle less elegant syntax just as well. I use a zero-malloc C dialect with slices and bounds-checking.Just recently I was sketching a smallish database in zero-malloc C. https://replicated.live/blog/db That was partly because most LSM data structures are read-only, so mmap was good enough and concurrent access was safe for the bulk of the data.The "hot zone" (memtable) then requires some intricate engineering, but that is the case either way.You can go quite far with zero-malloc C.
- anonundefined
- kvemkonGo compiler has an advanced escaping analyzer. Wouldn't it be easier and better to add this noalloc-analyzer feature to golang directly?
- zinodaurI love it. Any thoughts on allowing (value type) Pointers into a Region?