Re: [PATCH v3 07/25] rust: alloc: implement `KVmalloc` allocator

Danilo Krummrich
2024-08-01T12:31:37Z

On Thu, Aug 01, 2024 at 10:43:44AM +0200, Alice Ryhl wrote:
> On Thu, Aug 1, 2024 at 2:07 AM Danilo Krummrich <dakr@kernel.org> wrote:
> >
> > Implement `Allocator` for `KVmalloc`, an `Allocator` that tries to
> > allocate memory wth `kmalloc` first and, on failure, falls back to
> > `vmalloc`.
> >
> > All memory allocations made with `KVmalloc` end up in
> > `kvrealloc_noprof()`; all frees in `kvfree()`.
> >
> > Signed-off-by: Danilo Krummrich <dakr@kernel.org>
>
> The nit from vrealloc also applies here, but:

Yes, I will add the invariant comment for both.

>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
>