tosc-rs / mnemos

An Operating System for Building Small Computers
https://mnemos.dev
Apache License 2.0
253 stars 18 forks source link

feat(bitslab): add capacity limit to index allocs #293

Closed hawkw closed 1 year ago

hawkw commented 1 year ago

Currently, an IndexAlloc{N} from mnemos-bitslab will always allocate up to the number of bits in the numeric type used as the bitmap. In some cases, it may be desirable to allocate fewer values. Therefore, this branch adds support for setting an upper bound on the number of indices, which may be lower than the available bits.