You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if it was possible to use an alternate global allocator without recompiling all of Rust. This would make it painless to swap in a build of jemalloc with assertions enabled which is a very useful debugging tool. It would also mean that the default liballoc could use a build of jemalloc without niche frills like heap profiling and zero/junk filling without forcing a recompile to use them.
If and when jemalloc gains support for sized deallocation in the reallocation APIs (either upstream or in Rust's fork), a sane implementation of the non-standard API could be done via the platform allocator API. This would make it possible to choose between jemalloc and the platform allocator without recompiling Rust.
The text was updated successfully, but these errors were encountered:
I'm going to approach this another way. The replacement of the C library allocator will be a choice at compile-time but I don't think the sacrifices necessary to do the same thing for internal usage of jemalloc make sense.
It's still worth mixing jemalloc with the system allocator on most platforms, and those with jemalloc as the system allocator can be dealt with by having it call into that directly. It can just be hardcoded to use the system allocator in all cases on FreeBSD, etc.
It would be nice if it was possible to use an alternate global allocator without recompiling all of Rust. This would make it painless to swap in a build of jemalloc with assertions enabled which is a very useful debugging tool. It would also mean that the default liballoc could use a build of jemalloc without niche frills like heap profiling and zero/junk filling without forcing a recompile to use them.
If and when jemalloc gains support for sized deallocation in the reallocation APIs (either upstream or in Rust's fork), a sane implementation of the non-standard API could be done via the platform allocator API. This would make it possible to choose between jemalloc and the platform allocator without recompiling Rust.
The text was updated successfully, but these errors were encountered: