summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator_test.rs
blob: 4785efc474a7b1e6ff39641152e135011f668a07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// SPDX-License-Identifier: GPL-2.0

#![allow(missing_docs)]

use super::{AllocError, Allocator, Flags};
use core::alloc::Layout;
use core::ptr::NonNull;

pub struct Kmalloc;

unsafe impl Allocator for Kmalloc {
    unsafe fn realloc(
        _ptr: Option<NonNull<u8>>,
        _layout: Layout,
        _flags: Flags,
    ) -> Result<NonNull<[u8]>, AllocError> {
        panic!();
    }
}