xo-alloc2: working operator* for AAllocIterator
This commit is contained in:
parent
13edc3a973
commit
c6fbaf7b5e
5 changed files with 36 additions and 2 deletions
|
|
@ -269,6 +269,22 @@ namespace xo {
|
|||
REQUIRE(ix == end_ix);
|
||||
}
|
||||
}
|
||||
|
||||
// repeat, this time using range iteration
|
||||
{
|
||||
DArena scratch_mm
|
||||
= DArena::map(
|
||||
ArenaConfig{
|
||||
.size_ = 4*1024,
|
||||
.hugepage_z_ = 4*1024});
|
||||
|
||||
for (const auto & info : a1o.alloc_range(scratch_mm)) {
|
||||
REQUIRE(info.is_valid());
|
||||
REQUIRE(info.size() == padding::with_padding(req_z));
|
||||
REQUIRE(info.payload().first == mem);
|
||||
REQUIRE(info.payload().second == mem + info.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} /*namespace ut*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue