Re: [PATCH v2 3/5] rust: id_pool: do not supply starting capacity

From: Alice Ryhl
Date: Fri Oct 24 2025 - 05:17:37 EST


On Thu, Oct 23, 2025 at 01:37:05PM -0400, Yury Norov wrote:
> On Tue, Oct 21, 2025 at 01:32:45PM +0000, Alice Ryhl wrote:
> > When creating the initial IdPool, Rust Binder simply wants the largest
> > value that does not allocate. Having to handle allocating error failures
>
> That "value that does not allocate" wording is pretty confusing.
> Maybe:
> Rust binder is initially created with an arbitrary capacity
> such that the underlying bitmap is held inplace.
>
> Regardless:
>
> Acked-by: Yury Norov (NVIDIA) <yury.norov@xxxxxxxxx>

How about this?

Rust Binder wants to use inline bitmaps whenever possible to avoid
allocations, so introduce a constructor for an IdPool with arbitrary
capacity that stores the bitmap inline.

Alice