diff --git a/include/xo/alloc/GC.hpp b/include/xo/alloc/GC.hpp index aeb918c9..092f2f36 100644 --- a/include/xo/alloc/GC.hpp +++ b/include/xo/alloc/GC.hpp @@ -144,9 +144,17 @@ namespace xo { using GcCopyCallbackSet = xo::fn::UpCallbackSet; using nanos = decltype(xo::qty::qty::nanosecond); + /** rebind is for typed allocators. since IAlloc is untyped, + * we want degenerate version + **/ + template + struct rebind { using other = GC; }; + public: /** create new GC instance with configuration @p config **/ explicit GC(const Config & config); + /** noncopyable **/ + GC(const GC & other) = delete; virtual ~GC(); /** create GC allocator. diff --git a/include/xo/alloc/Object.hpp b/include/xo/alloc/Object.hpp index 2c11ea9e..9681afab 100644 --- a/include/xo/alloc/Object.hpp +++ b/include/xo/alloc/Object.hpp @@ -141,19 +141,6 @@ namespace xo { std::ostream & operator<< (std::ostream & os, gp x); - /** @class Cpof - * @brief argument to operator new used for garbage collector evacuation phase - * - * Tag overloaded operator new to activate allocation policy based on location - * in memory of source object. - **/ - class Cpof { - public: - explicit Cpof(gc::IAlloc * mm, const Object * src) : mm_{mm}, src_{src} {} - - gc::IAlloc * mm_ = nullptr; - const void * src_ = nullptr; - }; } /*namespace xo*/ void * operator new (std::size_t z, const xo::Cpof & copy);