diff options
author | Alice Ryhl <aliceryhl@google.com> | 2025-08-11 12:14:56 +0200 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2025-08-21 16:42:49 +0200 |
commit | ac9eea3d08c25fb213deb113d246ff5dadb31fbc (patch) | |
tree | 4df2bf1e33db099eeb7e3f33c747a7b6ec96698a /rust/kernel/types.rs | |
parent | 8efe8816a7ddc98a733ca3326ae8794750bbbd34 (diff) |
rust: alloc: implement Box::pin_slice()
Add a new constructor to Box to facilitate Box creation from a pinned
slice of elements. This allows to efficiently allocate memory for e.g.
slices of structrures containing spinlocks or mutexes. Such slices may
be used in kmemcache like or zpool API implementations.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.se>
Link: https://lore.kernel.org/r/20250811101456.2901694-1-vitaly.wool@konsulko.se
[ Add empty lines after struct definitions in the example; end sentences
with a period. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/types.rs')
0 files changed, 0 insertions, 0 deletions