-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Closed
Copy link
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
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)
)
Metadata
Metadata
Assignees
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.