diff options
| author | Yunheeee <yunhe27@126.com> | 2026-09-26 03:10:04 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2026-09-26 03:10:04 +0000 |
| commit | 269002da453895fc935101afefeb02d2c7d10360 (patch) | |
| tree | 42cc97a525c9cdf82542f831d0720759cfa34a44 /kerberos5/include | |
| parent | 10bd16d4e8279b0089f74caa457a849be77fc306 (diff) | |
bitmap_ctor() computed the allocation size as
roundup2(bits, LONG_BIT) / (LONG_BIT / 8)
The dividend is a count of bits, so converting it to bytes requires
dividing by 8 (bits per byte), not by LONG_BIT / 8 (bytes per long).
The two divisors happen to coincide on LP64, but on ILP32 platforms
the head bitmap was allocated at twice the required size; for a
FAT32 file system with close to 2^28 clusters, that is 64 MiB instead
of 32 MiB.
The extra half of the allocation was never accessed, so there is no
functional change other than the reduced memory footprint.
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/2440
Diffstat (limited to 'kerberos5/include')
0 files changed, 0 insertions, 0 deletions
