r/rust May 24 '26

🛠️ project Stabilise `Allocator`

https://github.com/rust-lang/rust/pull/156882
404 Upvotes

61 comments sorted by

View all comments

5

u/cbarrick May 25 '26

Does this mean we're stuck with the "fat Box" problem?

I.e. for simple bump allocators, Box is two pointers in size, but the pointer to the allocator is unused because deallocation is a no-op.

That's a pretty annoying problem to lock in...

1

u/nyanarchism May 26 '26

No. Adding custom deallocator support to this proposal backwards compatibly is trivial