Re: [PATCH v9 8/9] rust: id_pool: do not round capacity up to BitmapVec::MAX_INLINE_LEN
From: Eliot Courtney
Date: Fri Oct 16 2026 - 03:18:15 EST
On Thu Oct 15, 2026 at 11:00 PM JST, Yury Norov wrote:
[...]
>> As it turns out we would never perform a zero-sized malloc, even for a
>> zero-sized bitmap. `IdPool` is backed by a `BitmapVec`, which up to
>> `usize::BITS` uses an inline member as backing storage. So we would
>> never call `bitmap_zalloc` with a value of 0, making the safety concern
>> moot.
>
> OK. Then please remove the 0-length alloc with the following re-alloc
> example from the patch. use 1-bit allocation, as an extreme value, if
> needed.
Sure, I will update the example.