No, there are no task-specific heaps. An old concept from the manual is the "exchange heap", which is where ~ boxes lived (ie, the normal heap) and that @-boxes were some magic task-local heap. But you can always send Box<T> between tasks. There's been mention of wanting a task-local box in IRC. However, jemalloc uses per-thread caches, and does not always need to synchronize allocation.
On Wed, May 21, 2014 at 6:19 AM, Zoltán Tóth <zo1...@gmail.com> wrote: > Daniel Micay <danielmi...@gmail.com> wrote: >> >> ... the default >> allocator, which is jemalloc right now. >> > > Rust's memory management is still under-documented in the manual. I have a > question which have been bothering me for a while. I may have misunderstood > something basic. > > Jemalloc AFAIK synchronizes the allocations, as it is multithread-ready. > However does Rust not use task-specific heaps? [I thought that most of the > dynamic allocations happen in task-specific heaps.] For those is Jemalloc's > synchronization not an unnecessary waste of processor time? > > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev > -- http://octayn.net/ _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev