bmap_test_assert(count == num_items + 1);
delete arr;
- //delete list;
num_items = 4;
off = num_items - 1;
for (i = 0; i < num_items; i++) {
(*arr)[i].init(i);
}
-// list = new BitMapList<BmapEntityTmp>(arr, num_items, 0);
iter = BitMapEntityIter<BmapEntityTmp>(arr, off, true);
i = off;
last_idx = off;
bmap_test_assert(i == (off + 1)%num_items);
bmap_test_assert(count == num_items + 1);
+ delete arr;
+
/*
* BitMapArea Iter tests.
*/
bmap_test_assert(i == off);
bmap_test_assert(count == num_items);
- // offset 0
off = 0;
area_iter = BmapEntityListIter(area_list, off, true);
i = off;
}
bmap_test_assert(i == (off + 1)%num_items);
bmap_test_assert(count == num_items + 1);
+
+ for (i = 0; i < num_items; i++)
+ delete children[i];
+
+ delete children;
+ delete area_list;
}
TEST(BitAllocator, test_bmap_entry)
bmap_test_assert(!bmap->is_allocated(0, 4));
bmap->set_bits(0, 4);
bmap_test_assert(bmap->is_allocated(0, BmapEntry::size()));
+ delete bmap;
}
TEST(BitAllocator, test_zone_alloc)