about summary refs log tree commit diff
path: root/src/liballoc_jemalloc
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2018-04-20 21:05:13 -0700
committerSteven Fackler <sfackler@gmail.com>2018-04-22 10:08:17 -0700
commite513c1bd314bbeb6295a7a759de8833b52ff854d (patch)
tree538d71f49b7258fb3e55fdd6245dacd829f4dcf7 /src/liballoc_jemalloc
parent88873965137e752407d5797e7319410df2554f0c (diff)
downloadrust-e513c1bd314bbeb6295a7a759de8833b52ff854d.tar.gz
rust-e513c1bd314bbeb6295a7a759de8833b52ff854d.zip
Replace GlobalAlloc::oom with a lang item
Diffstat (limited to 'src/liballoc_jemalloc')
-rw-r--r--src/liballoc_jemalloc/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs
index 2b66c293f21..8b118a2cabb 100644
--- a/src/liballoc_jemalloc/lib.rs
+++ b/src/liballoc_jemalloc/lib.rs
@@ -30,8 +30,6 @@ extern crate libc;
 pub use contents::*;
 #[cfg(not(dummy_jemalloc))]
 mod contents {
-    use core::alloc::GlobalAlloc;
-    use alloc_system::System;
     use libc::{c_int, c_void, size_t};
 
     // Note that the symbols here are prefixed by default on macOS and Windows (we
@@ -100,10 +98,11 @@ mod contents {
         ptr
     }
 
+    #[cfg(stage0)]
     #[no_mangle]
     #[rustc_std_internal_symbol]
     pub unsafe extern fn __rde_oom() -> ! {
-        System.oom()
+        ::alloc_system::oom()
     }
 
     #[no_mangle]