xo-alloc2: + Allocator.allocated() + unit test

This commit is contained in:
Roland Conybeare 2025-12-12 11:58:49 -05:00
commit 045029ae19
7 changed files with 28 additions and 7 deletions

View file

@ -40,6 +40,11 @@ namespace xo {
return s.limit_ - s.free_;
}
size_t
IAllocator_DArena::allocated(const DArena & s) {
return s.free_ - s.lo_;
}
bool
IAllocator_DArena::contains(const DArena & s,
const void * p)