Commit ac9eea3d authored by Alice Ryhl's avatar Alice Ryhl Committed by Danilo Krummrich
Browse files

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: default avatarAlice Ryhl <aliceryhl@google.com>
Signed-off-by: default avatarVitaly 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: default avatarDanilo Krummrich <dakr@kernel.org>
parent 8efe8816
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment