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

From: Martin Rodriguez Reboredo
Date: Sun Jun 25 2023 - 23:34:27 EST


On 6/25/23 20:25, Boqun Feng 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]

I think that this should go above Link and Signed-off-bys, although I'm
not sure if maintainers do it when is merged.

Signed-off-by: Boqun Feng <boqun.feng@xxxxxxxxx>
---
Miguel, I fold my diff into Björn's original patch and make a v2, it
relies on the other patch:

https://lore.kernel.org/rust-for-linux/6e61f06f-2411-0bcb-926b-0a6927096f20@xxxxxxxxx/

So this v2 (if all goes well) is targeted for v6.6, JFYI.

v1 -> v2:

* Add size adjustment for align requirement.

[...]

Newbie question, aren't tabs in the commit message verboten?

Aside from those two nits everything else LGTM.

Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>