Skip to content

Commit 0e74aff

Browse files
committed
rust: remove alloc_error_handler
Closes #424. Suggested-by: bjorn3 <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 51a84b8 commit 0e74aff

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

rust/kernel/allocator.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ unsafe impl GlobalAlloc for KernelAllocator {
2727
#[global_allocator]
2828
static ALLOCATOR: KernelAllocator = KernelAllocator;
2929

30-
#[alloc_error_handler]
31-
fn oom(_layout: Layout) -> ! {
32-
panic!("Out of memory!");
33-
}
34-
3530
// `rustc` only generates these for some crate types. Even then, we would need
3631
// to extract the object file that has them from the archive. For the moment,
3732
// let's generate them ourselves instead.
@@ -66,8 +61,3 @@ pub fn __rust_alloc_zeroed(size: usize, _align: usize) -> *mut u8 {
6661
) as *mut u8
6762
}
6863
}
69-
70-
#[no_mangle]
71-
pub fn __rust_alloc_error_handler(_size: usize, _align: usize) -> ! {
72-
panic!("Out of memory!");
73-
}

0 commit comments

Comments
 (0)