xo-interpreter2 .. xo-arena. memory pool introspection

This commit is contained in:
Roland Conybeare 2026-02-03 01:05:36 -05:00
commit c931fca242
32 changed files with 157 additions and 172 deletions

View file

@ -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*/