Closed 00xc closed 5 months ago
Hm, test toolchain is too old so it does not have a stabilized div_ceil()
.
Hi @00xc, To update the toolchain, you'd need to update the dockerfile definition in https://github.com/rust-vmm/rust-vmm-container, propage the new container version through to https://github.com/rust-vmm/rust-vmm-ci, and then update the rust-vmm-ci submodule.
Ping for reviewers
Summary of the PR
Instead of checking a division remainder, use
usize::div_ceil()
, which will round division up, adding an extra member to the bitmap when needed.Since at the moment we unconditionally add 1 to
map_size
, this change results in allocating one lessAtomicU64
in some cases.Requirements
Before submitting your PR, please make sure you addressed the following requirements:
git commit -s
), and the commit message has max 60 characters for the summary and max 75 characters for each description line.N/A
All added/changed functionality has a corresponding unit/integration test.N/A
All added/changed public-facing functionality has entries in the "Upcoming Release" section of CHANGELOG.md (if no such section exists, please create one).N/A
Any newly addedunsafe
code is properly documented.