diff options
author | Danilo Krummrich <dakr@kernel.org> | 2024-10-04 18:41:08 +0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2024-10-15 23:56:27 +0300 |
commit | 8a799831fc63c988eec90d334fdd68ff5f2c7eb5 (patch) | |
tree | 17d05292dd8d54f2b73a45c94bec464f0e118bf8 /rust/kernel/alloc/allocator_test.rs | |
parent | 941e65531446c1eb5d573c5d30172117ebe96112 (diff) | |
download | linux-8a799831fc63c988eec90d334fdd68ff5f2c7eb5.tar.xz |
rust: alloc: implement `ReallocFunc`
`ReallocFunc` is an abstraction for the kernel's realloc derivates, such
as `krealloc`, `vrealloc` and `kvrealloc`.
All of the named functions share the same function signature and
implement the same semantics. The `ReallocFunc` abstractions provides a
generalized wrapper around those, to trivialize the implementation of
`Kmalloc`, `Vmalloc` and `KVmalloc` in subsequent patches.
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20241004154149.93856-5-dakr@kernel.org
[ Added temporary `allow(dead_code)` for `dangling_from_layout` to clean
warning in `rusttest` target as discussed in the list (but it is
needed earlier, i.e. in this patch already). Added colon. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/allocator_test.rs')
0 files changed, 0 insertions, 0 deletions