xo-gc: move DX1Collector.generation_of() impl -> GCObjectStore
This commit is contained in:
parent
1b3ecf9561
commit
57b6d2380b
3 changed files with 19 additions and 8 deletions
|
|
@ -62,6 +62,19 @@ namespace xo {
|
|||
}
|
||||
}
|
||||
|
||||
Generation
|
||||
GCObjectStore::generation_of(role r, const void * addr) const noexcept
|
||||
{
|
||||
for (Generation gi{0}; gi < n_generation_; ++gi) {
|
||||
const DArena * arena = this->get_space(r, gi);
|
||||
|
||||
if (arena->contains(addr))
|
||||
return gi;
|
||||
}
|
||||
|
||||
return Generation::sentinel();
|
||||
}
|
||||
|
||||
void
|
||||
GCObjectStore::visit_pools(const MemorySizeVisitor & visitor) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue