Files
linux-stable-mirror/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
..
2026-05-11 15:26:12 +02:00