xo-gc: refactor: migrate verify impl DX1Collector -> GCObjectStore

This commit is contained in:
Roland Conybeare 2026-04-10 20:32:55 -04:00
commit 53d9ab7747
5 changed files with 149 additions and 23 deletions

View file

@ -358,10 +358,12 @@ namespace xo {
/** cleanup after gc **/
void _cleanup_phase(Generation upto);
#ifdef OBSOLETE
/** Verify that pointer {@p iface, @p data} is valid:
* destination either in to-space, or somewhere outside this collector
**/
void _verify_aux(AGCObject * iface, void * data);
#endif
public:
/** garbage collector configuration **/

View file

@ -55,6 +55,9 @@ namespace xo {
**/
Generation generation_of(Role r, const void * addr) const noexcept;
/** return details from last error (i.e. from g0 to-space) **/
AllocError last_error() const noexcept;
/** get allocation size from header **/
std::size_t header2size(header_type hdr) const noexcept;
/** get generation counter from alloc header **/
@ -167,6 +170,15 @@ namespace xo {
void ** lhs_data,
Generation upto);
/** categorize fop {@p lhs_iface, @p lhs_data}
* based on location of @p lhs_data.
* Update @p *p_verify_stats based on the result:
* increment exactly one of {n_from_, n_to_, n_ext_}
**/
void verify_aux(AGCObject * lhs_iface,
void * lhs_data,
X1VerifyStats * p_verify_stats);
/** Cleanup at the end of a gc cycle.
* Reset from-space
* (current from-space is former to-space,