Expand description
It’s useful to be able to model an integral type such as u32
as being a series of bits,
instead of a whole number. There are, of course, the usual bitwise operators for simple stuff,
but the Bitmap
trait provides more complex, specific operations that are useful for bitmaps.
A common use of the Bitmap
trait is for memory allocators to track an area of pages, where
each bit represents a page. You might, for example, want to find a series of n
zeros (which
would mark an area of n
pages that are free to allocate) - the alloc
method provides this
functionality.
Traits§
- Like
Bitmap
, but for arrays. This is unfortunately needed due to conflicting implementations.