by shoefindortz · 5y ago · 0 comments
If you are willing to use cgo, google already implemented one for gapid.
https://github.com/google/gapid/tree/master/core/memory/aren...
There is still so much education to do.
Most of the time, their non-presence is due to general pools being just as good most of the time, or people simply not needing them that much with modern GC
Probably lack of experience with machine friendly code.
In what concerns me, although I like Rust, I only see it for scenarios where any kind of memory allocation is very precious, Ada/SPARK and MISRA-C style.
I have been using GC languages with C++ like features, or polyglot codebases, for almost 20 years to think otherwise.
Most of the time developers learn about new and miss out on the low level language features.
It is a matter of balance, either trying to do everything in a single language, or eventually write a couple of functions in a lower level language that are then used as building blocks for the rest of the application.
No need to throw away the ecosystem and developer tooling just to rewrite a data structure.
From the same author, a zero-unsafe arena allocator: https://github.com/fitzgen/generational-arena
There are many, many arena implementations available with varying characteristics. It's disingenuous to act like Rust requires the author of an arena library to write "unsafe" everywhere.