xo-alloc2: + Allocator.allocated() + unit test
This commit is contained in:
parent
7bca67eafc
commit
045029ae19
7 changed files with 28 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue