Re: [TECH TOPIC] Implementing malloc
Miguel Ojeda <[email protected]> Thu, 9 Jul 2026 19:40:55 +0200
| Newsgroups | dev.linux.lists.ksummit,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <CANiq72nQ=BmM0GRVrcmXHfE6VqD2hsssxqJEE40TirDiy82+wA@mail.gmail.com> |
On Thu, Jul 9, 2026 at 7:13 PM Matthew Wilcox <[email protected]> wrote: > > What I really don't want to see is a whole pile of Rust changes to > accommodate having to pass GFP flags to memory allocations. Would that > be a better vehicle for the discussion? Currently we already pass the GFP flags and support different allocators. For context, initially we used a vendored `alloc` crate, because we were trying to see if upstream could give us what we needed. Then in 2024 (v6.10) we were able to drop the vendored copy by using a workaround by Wedson that allowed us to pass the GFP flags and avoided our reliance on upstream's allocator unstable feature: b6a006e21b82 ("rust: alloc: introduce allocation flags") Later that year (v6.13), we couldn't wait much more, so we ended up implementing our own `alloc` module and allocator support on our side by Danilo: b7a084ba4fbb ("rust: alloc: add `Allocator` trait") Cc'ing rust-for-linux and Danilo. Cheers, Miguel