Re: [PATCH v2] rust: alloc: Add realloc and alloc_zeroed to the GlobalAlloc impl

From: Miguel Ojeda
Date: Sat Jul 29 2023 - 10:02:06 EST


On Mon, Jun 26, 2023 at 1:25 AM Boqun Feng <boqun.feng@xxxxxxxxx> wrote:
>
> While there are default impls for these methods, using the respective C
> api's is faster. Currently neither the existing nor these new
> GlobalAlloc method implementations are actually called. Instead the
> __rust_* function defined below the GlobalAlloc impl are used. With
> rustc 1.71 these functions will be gone and all allocation calls will go
> through the GlobalAlloc implementation.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/68
> Signed-off-by: Björn Roy Baron <bjorn3_gh@xxxxxxxxxxxxxx>
> [boqun: add size adjustment for alignment requirement]
> Signed-off-by: Boqun Feng <boqun.feng@xxxxxxxxx>

Applied to `rust-next`, thanks! I will use it as a base for the 1.71 upgrade.

Cheers,
Miguel