File tree 1 file changed +1
-19
lines changed
1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -39,25 +39,7 @@ pub mod thread_local;
39
39
pub mod time;
40
40
41
41
#[ cfg( not( test) ) ]
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
- }
60
- }
42
+ pub fn init ( ) { }
61
43
62
44
pub fn decode_error_kind ( errno : i32 ) -> ErrorKind {
63
45
match errno {
You can’t perform that action at this time.
0 commit comments