Revert "Remove BITMAP_USE_TREE."
Some systems use a native 64 KiB page size, which means that the bitmap
for the smallest size class can be 8192 bits, not just 512 bits as when
the page size is 4 KiB. Linear search in bitmap_{sfu,ffu}() is
unacceptably slow for such large bitmaps.
This reverts commit 7c00f04ff4
.
This commit is contained in:
@@ -103,8 +103,24 @@ test_bitmap_initializer_body(const bitmap_info_t *binfo, size_t nbits) {
|
||||
assert_zu_eq(binfo->nbits, binfo_dyn.nbits,
|
||||
"Unexpected difference between static and dynamic initialization, "
|
||||
"nbits=%zu", nbits);
|
||||
#ifdef BITMAP_USE_TREE
|
||||
assert_u_eq(binfo->nlevels, binfo_dyn.nlevels,
|
||||
"Unexpected difference between static and dynamic initialization, "
|
||||
"nbits=%zu", nbits);
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < binfo->nlevels; i++) {
|
||||
assert_zu_eq(binfo->levels[i].group_offset,
|
||||
binfo_dyn.levels[i].group_offset,
|
||||
"Unexpected difference between static and dynamic "
|
||||
"initialization, nbits=%zu, level=%u", nbits, i);
|
||||
}
|
||||
}
|
||||
#else
|
||||
assert_zu_eq(binfo->ngroups, binfo_dyn.ngroups,
|
||||
"Unexpected difference between static and dynamic initialization");
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_bitmap_initializer) {
|
||||
|
Reference in New Issue
Block a user