summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator_test.rs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2025-03-07 23:49:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-13 13:01:43 +0100
commite19e92087abab71494c3bc95d6467426e8de6e2b (patch)
tree480f9b6a2a25d1d7f6b03602804eb58cd9f2be0d /rust/kernel/alloc/allocator_test.rs
parentb3b7ea4b0d418b33ad77c569c83e6bf5796f2dfa (diff)
rust: alloc: implement `ReallocFunc`
commit 8a799831fc63c988eec90d334fdd68ff5f2c7eb5 upstream. `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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/alloc/allocator_test.rs')
0 files changed, 0 insertions, 0 deletions