aboutsummaryrefslogtreecommitdiffstats
path: root/components/profile/lib.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-10-18 13:38:07 +0200
committerSimon Sapin <simon.sapin@exyr.org>2017-10-19 09:52:50 +0200
commit959ce482dd9f2f8c469964b8c258bd3e45f7ca2b (patch)
treeb20d798d3ee0f78ba2f95012e111aaf17bb56462 /components/profile/lib.rs
parent4c538b642e4bdfbf42c522c5a59c258a6d14546e (diff)
downloadservo-959ce482dd9f2f8c469964b8c258bd3e45f7ca2b.tar.gz
servo-959ce482dd9f2f8c469964b8c258bd3e45f7ca2b.zip
Stop relying on linking details of std’s default allocator
We’ve been bitten before by symbol names changing: https://github.com/servo/heapsize/pull/46 and upstream is planning to stop using jemalloc by default: https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465 So use the (relatively) new `#[global_allocator]` attribute to explicitly select the system allocator on Windows and jemalloc (now in an external crate) on other platforms. This choice matches current defaults.
Diffstat (limited to 'components/profile/lib.rs')
-rw-r--r--components/profile/lib.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/components/profile/lib.rs b/components/profile/lib.rs
index 96b8edb7e17..d01aad61cd0 100644
--- a/components/profile/lib.rs
+++ b/components/profile/lib.rs
@@ -2,17 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#![cfg_attr(all(feature = "unstable", not(target_os = "windows")), feature(alloc_jemalloc))]
-
#![deny(unsafe_code)]
#[allow(unused_extern_crates)]
-#[cfg(all(feature = "unstable", not(target_os = "windows")))]
-extern crate alloc_jemalloc;
extern crate heartbeats_simple;
extern crate influent;
extern crate ipc_channel;
-#[allow(unused_extern_crates)]
+#[cfg(all(feature = "unstable", not(target_os = "windows")))]
+extern crate jemalloc_sys;
#[cfg(not(target_os = "windows"))]
extern crate libc;
#[macro_use]