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

From: Boqun Feng
Date: Sun Jun 25 2023 - 19:14:20 EST


On Sat, Jun 24, 2023 at 02:40:23PM +0000, Björn Roy Baron wrote:
> On Friday, June 23rd, 2023 at 19:35, Boqun Feng <boqun.feng@xxxxxxxxx> wrote:
>
> > On Thu, Jun 22, 2023 at 09:24:40PM +0200, Björn Roy Baron via B4 Relay wrote:
> >
> > > From: Björn Roy Baron bjorn3_gh@xxxxxxxxxxxxxx
> > >
> > > 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
> >
> >
> > Nice! Although I think we need to do the simialr size adjustment as:
> >
> > https://lore.kernel.org/rust-for-linux/20230613164258.3831917-1-boqun.feng@xxxxxxxxx/
> >
> > so I applied your patch onto my patch and came up with the following:
>
> Right. That patch LGTM.
>

Thank you and Gary for the diff review, I will fold it into your
original patch and resend.

Regards,
Boqun

> Cheers,
> Björn