1 // SPDX-License-Identifier: GPL-2.0 2 3 #![allow(missing_docs)] 4 5 use super::{AllocError, Allocator, Flags}; 6 use core::alloc::Layout; 7 use core::ptr::NonNull; 8 9 pub struct Kmalloc; 10 11 unsafe impl Allocator for Kmalloc { 12 unsafe fn realloc( 13 _ptr: Option<NonNull<u8>>, 14 _layout: Layout, 15 _old_layout: Layout, 16 _flags: Flags, 17 ) -> Result<NonNull<[u8]>, AllocError> { 18 panic!(); 19 } 20 } 21