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 pub type Vmalloc = Kmalloc; 11 12 unsafe impl Allocator for Kmalloc { 13 unsafe fn realloc( 14 _ptr: Option<NonNull<u8>>, 15 _layout: Layout, 16 _old_layout: Layout, 17 _flags: Flags, 18 ) -> Result<NonNull<[u8]>, AllocError> { 19 panic!(); 20 } 21 } 22