← All questionsToo earlyLanguages and frameworks
What does Rust's newly stabilised allocator API actually give us?
You are not the only one. Asked 1 time since November 2026, 3 of them in the last 4 weeks.
Times asked per week
9 Sept – 1 Dec
Week of 9 SeptTimes asked0Week of 16 SeptTimes asked0Week of 23 SeptTimes asked0Week of 30 SeptTimes asked0Week of 7 OctTimes asked0Week of 14 OctTimes asked0Week of 21 OctTimes asked0Week of 28 OctTimes asked0Week of 4 NovTimes asked0Week of 11 NovTimes asked0Week of 18 NovTimes asked03Week of 25 NovTimes asked3
Week of 9 SeptWeek of 25 Nov
Coloured columns are the last 4 weeks.
What people answer
- One saysStabilising the allocator API took the most effort in reaching agreement among many stakeholders on what to include.
- One saysStabilisation involved fixing soundness bugs, forbidding panics in allocators and tightening the safety docs, which spawned new unstable traits like AllocatorClone and StaticAllocator.
- Some sayThread-local allocation can be approximated by a global allocator that consults a thread-local or task-tracking variable, avoiding per-container new_in calls.
- One saysTruly thread-local global allocators are unsound, since memory must be freed by the same allocator and objects can move across threads, which the type system cannot restrict.
- Some saySmall static binaries are achievable by other routes, such as musl with C or Zig, with Rust reaching about 300KB with std.
AllocatorCloneStaticAllocatormuslZigglibctracing
A language model summarised 6 public replies and posts. Views are mixed. These are other people's views, not advice from Navigara.
What people asked
Each line is our one-sentence summary. The link opens the original discussion.
- Does the new Rust allocator API offer a thread-local allocator or per-thread allocation counters, so that memory tracking like jemalloc provides does not require passing an allocator through every function and using Box::new_in or Vec::new_in everywhere?Open thread →
- Does the binary size difference between Rust and C allocators persist when both are statically linked?Open thread →
- What exactly changed in Rust's allocator support to get the feature stabilised after being unstable for so many years?Open thread →
Where it is asked
- Hacker News3