linux/rust/kernel/alloc
Danilo Krummrich abb21500e7 rust: alloc: add Box::zeroed()
Add Box::zeroed() for T: Zeroable types.

This allocates with __GFP_ZERO directly, letting the underlying
allocator deal with zeroing out the memory compared to
Box::new(T::zeroed(), flags).

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260505152400.3905096-2-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-05-11 15:26:12 +02:00
..
allocator rust: alloc: simplify with NonNull::add() now that it is stable 2026-04-07 10:00:24 +02:00
kvec rust: kernel: mark as #[inline] all From::from()s for Error 2026-03-27 12:49:00 +01:00
allocator.rs Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
kbox.rs rust: alloc: add Box::zeroed() 2026-05-11 15:26:12 +02:00
kvec.rs rust: alloc: add KUnit tests for KVVec shrink_to 2026-02-26 21:37:53 -08:00
layout.rs drm next for 6.18-rc1 2025-10-02 12:47:25 -07:00