3 ms·
While this is true, this doesn't inherently mean you can't do this pattern. https://crates.io/crates/typed_arena https://crates.io/crates/typed_arena for exampl
by steveklabnik 6y ago
While this is true, this doesn't inherently mean you can't do this pattern. https://crates.io/crates/typed_arena https://crates.io/crates/typed_arena for example. It depends on exactly how allocations and your data structure are tied together.
- laurencerowe 6y agoIt would be amazingly handy if someday it was possible to direct Rust to make all heap allocations under a certain block within an arena. At the moment it looks like you have to rewrite any third party code that makes heap allocations to use the arena explicitly at each allocation.
- steveklabnik 6y agoYep, it would. There’s certainly a bunch of work to do here still.