gecko-dev/servo/components/profile/lib.rs
Simon Sapin c97a708440 servo: Merge #18944 - Stop relying on linking details of std’s default allocator (from servo:jemallocator2); r=nox
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 07e9794306d597afe5d90d192fd32a99572c3cc3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c773f809c4f783e63c42218220e7c8c190727e6e
2017-10-19 09:15:17 -05:00

35 lines
881 B
Rust

/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#![deny(unsafe_code)]
#[allow(unused_extern_crates)]
extern crate heartbeats_simple;
extern crate influent;
extern crate ipc_channel;
#[cfg(all(feature = "unstable", not(target_os = "windows")))]
extern crate jemalloc_sys;
#[cfg(not(target_os = "windows"))]
extern crate libc;
#[macro_use]
extern crate log;
#[macro_use]
extern crate profile_traits;
#[cfg(target_os = "linux")]
extern crate regex;
#[macro_use]
extern crate serde;
extern crate serde_json;
extern crate servo_config;
#[cfg(target_os = "macos")]
extern crate task_info;
extern crate time as std_time;
#[allow(unsafe_code)]
mod heartbeats;
#[allow(unsafe_code)]
pub mod mem;
pub mod time;
pub mod trace_dump;