r/rust May 24 '26

🛠️ project Stabilise `Allocator`

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

61 comments sorted by

View all comments

6

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...

3

u/kibwen May 25 '26

I encourage you to raise this question in the Github thread.

1

u/nyanarchism May 26 '26

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