int64_t pos = l0_pos_start;
slot_t bits = (slot_t)1 << (pos % d0);
size_t idx = pos / d0;
+ if (idx >= l0.size()) {
+ return pos;
+ }
slot_t* val_s = l0.data() + idx;
int64_t pos_e = p2roundup<int64_t>(pos + 1, d0);
ASSERT_EQ(0x1000, claimed);
ASSERT_EQ(0x2000, al2.debug_get_free());
+ // claiming on the right boundary
+ claimed = al2.claim_free_to_right(capacity);
+ ASSERT_EQ(0x0, claimed);
+ ASSERT_EQ(0x2000, al2.debug_get_free());
+
// extend allocator space up to 64M
auto max_available2 = 64 * 1024 * 1024;
al2.mark_free(max_available, max_available2 - max_available);