Re: Re: [PATCH 1/2] rnull: support 64K pages
From: Yury Norov
Date: Wed Dec 02 2026 - 13:59:59 EST
On Wed, Dec 02, 2026 at 07:05:30PM +0100, Vitaly Wool wrote:
> <snip>
> > > A `BitmapVec` keeps up to `usize::BITS` bits inline and allocates its
> > > storage with `bitmap_zalloc()` beyond that. A bitmap embedded in a
> > > structure that is allocated anyway, with a maximum length known at
> > > compile time, then needs a second allocation and a pointer to follow,
> > > or `unsafe` code that wraps an array with `Bitmap::from_raw()`.
> > >
> > > Add `BitmapArray<WORDS>`, an owned bitmap of up to `WORDS` words of
> > > bits stored inline, which never allocates and dereferences to `Bitmap`
> > > like `BitmapVec`.
>
> > BitmapArray is a tautology. Bitmap is already an "array of bits". So
> > unless you're talking about 2d bitmaps, the name is wrong
>
> Well, this is a theological thing in some sense. One may argue that a
> bitmap is a _vector_ of bits, so BitmapVec is also a tautology. I would
> prefer we didn't go into that rabbit hole.
That's true. I overlooked that when BitmapVec was proposed. The
proper name for it is BitVec. Feel free to submit a patch.