diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-10-19 09:15:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-19 09:15:17 -0500 |
commit | 07e9794306d597afe5d90d192fd32a99572c3cc3 (patch) | |
tree | 083c71bdf8216ca56d38d509e5b2988eb18da5ca /components/script/lib.rs | |
parent | 6f52b331b8c6c38405964cdeacbc9f771c70b18c (diff) | |
parent | 959ce482dd9f2f8c469964b8c258bd3e45f7ca2b (diff) | |
download | servo-07e9794306d597afe5d90d192fd32a99572c3cc3.tar.gz servo-07e9794306d597afe5d90d192fd32a99572c3cc3.zip |
Auto merge of #18944 - servo:jemallocator2, r=nox
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.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18944)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/lib.rs')
-rw-r--r-- | components/script/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/lib.rs b/components/script/lib.rs index edf954d4c96..df9679bcaf2 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -78,6 +78,7 @@ extern crate script_layout_interface; extern crate script_traits; extern crate selectors; extern crate serde; +extern crate servo_allocator; extern crate servo_arc; #[macro_use] extern crate servo_atoms; extern crate servo_config; |