3 ms·
Rust has an arena allocator too[1], but it is implemented with 165(!!!) usages of unsafe. :) [1] https://github.com/fitzgen/bumpalo https://github.com/fitzgen/
by shoefindortz 5y ago
Rust has an arena allocator too[1], but it is implemented with 165(!!!) usages of unsafe. :)
[1] https://github.com/fitzgen/bumpalo https://github.com/fitzgen/bumpalo
- coder543 5y agoThis is far from the only arena allocator written in Rust. From the same author, a zero-unsafe arena allocator: https://github.com/fitzgen/generational-arena 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.