mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 06:14:27 +00:00
Fix corner case where the size is a power of two.
This commit is contained in:
parent
f83b279588
commit
e94b542e02
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=221356
|
@ -76,7 +76,7 @@ sz2shft(vm_offset_t ofs, vm_size_t sz)
|
|||
|
||||
shft = 12; /* Start with 4K */
|
||||
s = 1 << shft;
|
||||
while (s < sz) {
|
||||
while (s <= sz) {
|
||||
shft++;
|
||||
s <<= 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue