Re: [PATCH] rust: slab: add basic slab module
From: Alice Ryhl
Date: Thu Sep 25 2025 - 13:54:55 EST
On Thu, Sep 25, 2025 at 11:54 AM Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
> (3) Implement a macro to generate a custom KmemCache Allocator trait
> implementation for every KmemCache instance with a static lifetime.
>
> This makes KmemCache technically equivalent to the other allocators, such
> as Kmalloc, etc. but obviously has the downside that the KmemCache might
> live much longer than required.
>
> Technically, most KmemCache instances live for the whole module lifetime,
> so it might be fine though.
>
> (This is what I think Alice proposed.)
Yes, this is what I proposed. Most kmemcaches live for the duration of
the module, so it's no issue if they are global.
Alice