Use the default panicking alloc error handler
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
//! Intrinsics for panic handling
|
||||
|
||||
use core::alloc::Layout;
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
use crate::{cpu_id, context, interrupt, syscall};
|
||||
@@ -33,10 +32,3 @@ pub extern "C" fn rust_begin_unwind(info: &PanicInfo) -> ! {
|
||||
unsafe { interrupt::halt(); }
|
||||
}
|
||||
}
|
||||
|
||||
#[alloc_error_handler]
|
||||
#[no_mangle]
|
||||
#[allow(improper_ctypes_definitions)] // Layout is not repr(C)
|
||||
pub extern fn rust_oom(_layout: Layout) -> ! {
|
||||
panic!("kernel memory allocation failed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user