diff options
| author | Jeremy Soller <jackpot51@gmail.com> | 2017-07-12 20:39:02 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-12 20:39:02 -0600 |
| commit | bd9428a46b7290b8f87d830655b473099207ae0d (patch) | |
| tree | e9f74a7ace0e8c4b0692f2660efa58103fb78d75 /src/libstd/sys | |
| parent | f85579d4a2c342654f9b158fafd565eb159fdb59 (diff) | |
| download | rust-bd9428a46b7290b8f87d830655b473099207ae0d.tar.gz rust-bd9428a46b7290b8f87d830655b473099207ae0d.zip | |
Update mod.rs
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/redox/mod.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/libstd/sys/redox/mod.rs b/src/libstd/sys/redox/mod.rs index 31c40ea58b1..bd5b40de9a0 100644 --- a/src/libstd/sys/redox/mod.rs +++ b/src/libstd/sys/redox/mod.rs @@ -40,23 +40,7 @@ pub mod time; #[cfg(not(test))] pub fn init() { - use alloc::oom; - - 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 { - let _ = syscall::write(2, msg.as_bytes()); - intrinsics::abort(); - } - } + } pub fn decode_error_kind(errno: i32) -> ErrorKind { |
