linux/rust/kernel/alloc
Alice Ryhl ac9eea3d08 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>
2025-08-21 16:42:49 +02:00
..
kvec rust: alloc: add Vec::insert_within_capacity 2025-05-07 18:40:45 +02:00
allocator.rs rust: alloc: specify the minimum alignment of each allocator 2025-08-15 20:55:16 +02:00
allocator_test.rs rust: enable clippy::ptr_as_ptr lint 2025-06-22 23:08:42 +02:00
kbox.rs rust: alloc: implement Box::pin_slice() 2025-08-21 16:42:49 +02:00
kvec.rs rust: make kvec::Vec functions const fn 2025-08-15 19:58:51 +02:00
layout.rs rust: make ArrayLayout::new_unchecked a const fn 2025-08-15 19:58:51 +02:00