diff options
| author | Wedson Almeida Filho <[email protected]> | 2024-03-28 01:35:59 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2024-04-16 20:47:20 +0000 |
| commit | 08d3f54928796557fc832467ad54f04908fc14e4 (patch) | |
| tree | 6b69b62459f71aaeac0021e2e81ff61ca9a1c991 /samples/rust/rust_print.rs | |
| parent | rust: alloc: introduce allocation flags (diff) | |
| download | kernel-08d3f54928796557fc832467ad54f04908fc14e4.tar.gz kernel-08d3f54928796557fc832467ad54f04908fc14e4.zip | |
rust: alloc: introduce the `BoxExt` trait
Make fallible versions of `new` and `new_uninit` methods available in
`Box` even though it doesn't implement them because we build `alloc`
with the `no_global_oom_handling` config.
They also have an extra `flags` parameter that allows callers to pass
flags to the allocator.
Signed-off-by: Wedson Almeida Filho <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Reviewed-by: Benno Lossin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Used `Box::write()` to avoid one `unsafe` block as suggested by Boqun. ]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'samples/rust/rust_print.rs')
0 files changed, 0 insertions, 0 deletions
