From d86fadb6c7c7295ed85c46b060ea77b757755056 Mon Sep 17 00:00:00 2001 From: panicbit Date: Sun, 9 Jul 2017 21:37:35 +0200 Subject: ctr-std: Migrate to the new liballoc API --- ctr-std/src/sys/unix/mod.rs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'ctr-std/src/sys') diff --git a/ctr-std/src/sys/unix/mod.rs b/ctr-std/src/sys/unix/mod.rs index df2be06..9d57045 100644 --- a/ctr-std/src/sys/unix/mod.rs +++ b/ctr-std/src/sys/unix/mod.rs @@ -33,8 +33,6 @@ pub mod alloc; #[cfg(not(test))] pub fn init() { - use alloc::oom; - // By default, some platforms will send a *signal* when an EPIPE error // would otherwise be delivered. This runtime doesn't install a SIGPIPE // handler, causing it to kill the program, which isn't exactly what we @@ -46,24 +44,6 @@ pub fn init() { reset_sigpipe(); } - oom::set_oom_handler(oom_handler); - - // A nicer handler for out-of-memory situations than the default one. This - // one prints a message to stderr before aborting. It is critical that this - // code does not allocate any memory since we are in an OOM situation. Any - // errors are ignored while printing since there's nothing we can do about - // them and we are about to exit anyways. - fn oom_handler() -> ! { - use intrinsics; - let msg = "fatal runtime error: out of memory\n"; - unsafe { - libc::write(libc::STDERR_FILENO, - msg.as_ptr() as *const libc::c_void, - msg.len()); - intrinsics::abort(); - } - } - // I don't think we have signal handling on the 3DS, so let's leave this // blank for now unsafe fn reset_sigpipe() {} -- cgit v1.2.3