Re:Writing a JPEG Decoder in Rust – Part 2: Implementation I
by steveklabnik on Friday August 19, 2016 @09:38PM
(#12324640)
Currently, "the allocator" is global in Rust. That is, the standard library uses liballoc to do all of its heap allocation, and it's liballoc that aborts on OOM.
You can of course write code that does anything, including use some other mechanism than liballoc.
There's motion on several fronts here:
The first, and currently unstable, is swapping out the implementation of liballoc for a different one. (we ship jemalloc and a pass-through to the system allocator with Rust)
The second, and currently in the "working on an RFC" phase, is per-object allocators.
Both of these are unstable because we're not 100% sure of the interface we want to stabilize yet, it's still a work in progress.
You can of course write code that does anything, including use some other mechanism than liballoc.
There's motion on several fronts here:
The first, and currently unstable, is swapping out the implementation of liballoc for a different one. (we ship jemalloc and a pass-through to the system allocator with Rust)
The second, and currently in the "working on an RFC" phase, is per-object allocators.
Both of these are unstable because we're not 100% sure of the interface we want to stabilize yet, it's still a work in progress.
Boxing always implies dynamic allocation.