xo-alloc xo-ordinaltree: GC option work in progress

This commit is contained in:
Roland Conybeare 2025-12-01 14:22:41 -05:00
commit 3a840546fe
12 changed files with 79 additions and 23 deletions

View file

@ -64,7 +64,7 @@ namespace xo {
* 3. return the location of the copy make in step 1.
*
* @p src. source object to be forwarded
* @p gc. garbage collector
* @p gc. allocator (poassibly garbage collector)
*/
static IObject * _forward(IObject * src, gc::IAlloc * gc);

View file

@ -23,7 +23,7 @@ namespace xo {
gp<Object> member() const { return member_; }
void assign_member(Object * x) {
Object::mm->assign_member(this, member_.ptr_address(), x);
Object::mm->assign_member(this, reinterpret_cast<IObject**>(member_.ptr_address()), x);
}
TaggedPtr self_tp() const final override {
@ -33,7 +33,7 @@ namespace xo {
void display(std::ostream & os) const final override { os << data_; }
virtual std::size_t _shallow_size() const final override { return sizeof(*this); }
virtual Object * _shallow_copy(gc::IAlloc * mm) const final override { return new (Cpof(mm, this)) DummyObject(*this); }
virtual IObject * _shallow_copy(gc::IAlloc * mm) const final override { return new (Cpof(mm, this)) DummyObject(*this); }
virtual std::size_t _forward_children(gc::IAlloc * gc) final override { return _shallow_size(); }
private:

View file

@ -3,7 +3,7 @@
* author: Roland Conybeare, Aug 2025
*/
#include "xo/alloc/IAlloc.hpp"
#include "xo/allocutil/IAlloc.hpp"
#include <catch2/catch.hpp>
namespace xo {