Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions rust/kernel/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ unsafe impl GlobalAlloc for KernelAllocator {
#[global_allocator]
static ALLOCATOR: KernelAllocator = KernelAllocator;

#[alloc_error_handler]
fn oom(_layout: Layout) -> ! {
panic!("Out of memory!");
}

// `rustc` only generates these for some crate types. Even then, we would need
// to extract the object file that has them from the archive. For the moment,
// let's generate them ourselves instead.
Expand Down Expand Up @@ -66,8 +61,3 @@ pub fn __rust_alloc_zeroed(size: usize, _align: usize) -> *mut u8 {
) as *mut u8
}
}

#[no_mangle]
pub fn __rust_alloc_error_handler(_size: usize, _align: usize) -> ! {
panic!("Out of memory!");
}