diff options
author | Josh Matthews <josh@joshmatthews.net> | 2018-05-18 11:44:47 -0500 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2018-05-18 11:44:47 -0500 |
commit | e7979380bafbb484ea63f7ad5f338b266a6bc0a5 (patch) | |
tree | 1fa4903319fcd9a16b037069283109d5787ffa9a /components/allocator/lib.rs | |
parent | a8bdd44ecea6dc6cd553f80e31d1705e3f34c559 (diff) | |
download | servo-e7979380bafbb484ea63f7ad5f338b266a6bc0a5.tar.gz servo-e7979380bafbb484ea63f7ad5f338b266a6bc0a5.zip |
Revert "Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)"
This reverts commit 46ad8110172cfc9d8d420e8eb41863f3d394e24d.
Diffstat (limited to 'components/allocator/lib.rs')
-rw-r--r-- | components/allocator/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/components/allocator/lib.rs b/components/allocator/lib.rs index c2f2d9796a4..3d933599688 100644 --- a/components/allocator/lib.rs +++ b/components/allocator/lib.rs @@ -17,7 +17,7 @@ pub use platform::*; mod platform { extern crate jemalloc_sys as ffi; - use std::alloc::{GlobalAlloc, Layout, Opaque}; + use std::alloc::{GlobalAlloc, Layout, Opaque, System}; use std::os::raw::{c_int, c_void}; /// Get the size of a heap block. @@ -94,6 +94,11 @@ mod platform { let flags = layout_to_flags(layout.align(), new_size); ffi::rallocx(ptr as *mut _, new_size, flags) as *mut Opaque } + + #[inline] + fn oom(&self) -> ! { + System.oom() + } } } |