Closed
Description
It seems that ever since the 2017-07-07 nightly, using the alloc_system
crate causes jemalloc to be linked in. For example, if I change the default hello world sample crate to the following:
#![feature(alloc_system)]
extern crate alloc_system;
fn main() {
println!("Hello, world!");
}
then the binary built by the 2017-07-07 toolchain contains jemalloc symbols, while the binary built by the 2017-07-06 toolchain does not.
[hello] rm -rf target/release; cargo +nightly-2017-07-06 build --release; strings target/release/hello | grep -c jemalloc
Compiling hello v0.1.0 (file:///tmp/rust/hello)
Finished release [optimized] target(s) in 0.32 secs
0
[hello] rm -rf target/release; cargo +nightly-2017-07-07 build --release; strings target/release/hello | grep -c jemalloc
Compiling hello v0.1.0 (file:///tmp/rust/hello)
Finished release [optimized] target(s) in 0.42 secs
269
Could this be related to the allocator PRs that have been merged recently? Or perhaps the code above is no longer the way to select the system allocator?
Versions:
nightly-2017-07-06-x86_64-unknown-linux-gnu
(rustc 1.20.0-nightly (3610a70ce 2017-07-05)
)nightly-2017-07-07-x86_64-unknown-linux-gnu
(rustc 1.20.0-nightly (696412de7 2017-07-06)
)