xo-alloc: + gc history xo-imgui: gui examples
This commit is contained in:
parent
cbaa4c90f8
commit
f4be2e765e
20 changed files with 2015 additions and 18 deletions
|
|
@ -113,6 +113,7 @@ namespace xo {
|
|||
}
|
||||
|
||||
this->committed_z_ = align_offset_z;
|
||||
this->limit_ = this->lo_ + committed_z_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -133,6 +134,16 @@ namespace xo {
|
|||
}
|
||||
}
|
||||
|
||||
std::pair<bool, std::size_t>
|
||||
ArenaAlloc::location_of(const void * x) const
|
||||
{
|
||||
if ((lo_ <= x) && (x < hi_)) {
|
||||
return std::make_pair(true, reinterpret_cast<const std::byte *>(x) - lo_);
|
||||
} else {
|
||||
return std::make_pair(false, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ArenaAlloc::capture_object_statistics(capture_phase phase,
|
||||
ObjectStatistics * p_dest) const
|
||||
|
|
@ -276,6 +287,7 @@ namespace xo {
|
|||
xtag("z0", z0),
|
||||
xtag("+pad", dz),
|
||||
xtag("z1", z1),
|
||||
xtag("size", this->size()),
|
||||
xtag("avail", this->available()));
|
||||
|
||||
this->free_ptr_ += z1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue