linux/rust/kernel/alloc
Timur Tabi 60782beb11 rust: alloc: add Vec::zeroed method
Add a constructor for kernel Vec that allocates a vector of a given length
with all elements zero-initialized. Memory is allocated with the __GFP_ZERO
flag, matching the existing KBox::zeroed() pattern.

Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260731201017.2580713-2-ttabi@nvidia.com
Co-developed-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-06 01:22:14 +02:00
..
allocator rust: alloc: cleanup imports and use "kernel vertical" style 2026-05-20 17:34:17 +02:00
kvec rust: alloc: cleanup imports and use "kernel vertical" style 2026-05-20 17:34:17 +02:00
allocator.rs rust: tests: add Kconfig for KUnit test 2026-06-08 02:30:33 +02:00
kbox.rs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
kvec.rs rust: alloc: add Vec::zeroed method 2026-08-06 01:22:14 +02:00
layout.rs rust: alloc: cleanup doctest imports to "kernel vertical" style 2026-05-20 17:34:17 +02:00