xo-interpreter2 .. xo-arena. memory pool introspection
This commit is contained in:
parent
f6aae4190e
commit
c931fca242
32 changed files with 157 additions and 172 deletions
|
|
@ -160,22 +160,11 @@ namespace xo {
|
|||
return true;
|
||||
}
|
||||
|
||||
std::size_t
|
||||
StringTable::_n_store() const noexcept
|
||||
void
|
||||
StringTable::visit_pools(const MemorySizeVisitor & visitor) const
|
||||
{
|
||||
return 1 + map_._n_store();
|
||||
}
|
||||
|
||||
MemorySizeInfo
|
||||
StringTable::_store_info(std::size_t i) const noexcept
|
||||
{
|
||||
if (i == 0)
|
||||
return strings_._store_info();
|
||||
|
||||
if (i+1 < map_._n_store())
|
||||
return map_._store_info(i-1);
|
||||
|
||||
return MemorySizeInfo::sentinel();
|
||||
strings_.visit_pools(visitor);
|
||||
map_.visit_pools(visitor);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue