File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -40,23 +40,7 @@ pub mod time;
40
40
41
41
#[ cfg( not( test) ) ]
42
42
pub fn init ( ) {
43
- use alloc:: oom;
44
-
45
- oom:: set_oom_handler ( oom_handler) ;
46
-
47
- // A nicer handler for out-of-memory situations than the default one. This
48
- // one prints a message to stderr before aborting. It is critical that this
49
- // code does not allocate any memory since we are in an OOM situation. Any
50
- // errors are ignored while printing since there's nothing we can do about
51
- // them and we are about to exit anyways.
52
- fn oom_handler ( ) -> ! {
53
- use intrinsics;
54
- let msg = "fatal runtime error: out of memory\n " ;
55
- unsafe {
56
- let _ = syscall:: write ( 2 , msg. as_bytes ( ) ) ;
57
- intrinsics:: abort ( ) ;
58
- }
59
- }
43
+
60
44
}
61
45
62
46
pub fn decode_error_kind ( errno : i32 ) -> ErrorKind {
You can’t perform that action at this time.
0 commit comments