diff options
author | Danilo Krummrich <dakr@kernel.org> | 2024-07-23 18:58:37 +0200 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2024-08-13 16:05:07 +0200 |
commit | 5fe01f4ab424b366e49cf213e40c0db9ed23c2a1 (patch) | |
tree | 146bb95b7f17287301cc71b5e3f876f8ca65faa6 /rust/kernel/alloc/allocator_test.rs | |
parent | dc3c7162dce3770ee4159ccf970bf404c1730558 (diff) |
rust: alloc: implement `Vmalloc` allocator
Implement `Allocator` for `Vmalloc`, the kernel's virtually contiguous
allocator, typically used for larger objects, (much) larger than page
size.
All memory allocations made with `Vmalloc` end up in `vrealloc()`.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/allocator_test.rs')
-rw-r--r-- | rust/kernel/alloc/allocator_test.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/kernel/alloc/allocator_test.rs b/rust/kernel/alloc/allocator_test.rs index 4785efc474a7..e7bf2982f68f 100644 --- a/rust/kernel/alloc/allocator_test.rs +++ b/rust/kernel/alloc/allocator_test.rs @@ -7,6 +7,7 @@ use core::alloc::Layout; use core::ptr::NonNull; pub struct Kmalloc; +pub type Vmalloc = Kmalloc; unsafe impl Allocator for Kmalloc { unsafe fn realloc( |