diff --git a/include/xo/alloc2/SetupAlloc2.hpp b/include/xo/alloc2/SetupAlloc2.hpp new file mode 100644 index 00000000..f55d6edf --- /dev/null +++ b/include/xo/alloc2/SetupAlloc2.hpp @@ -0,0 +1,18 @@ +/** @file SetupAlloc2.hpp + * + * @author Roland Conybeare, Feb 2026 + **/ + +#pragma once + +namespace xo { + namespace mm { + class SetupAlloc2 { + public: + /** Register alloc2 (facet,impl) combinations with Facet Registry **/ + static bool register_facets(); + }; + } +} + +/* end SetupAlloc2.hpp */ diff --git a/src/alloc2/SetupAlloc2.cpp b/src/alloc2/SetupAlloc2.cpp new file mode 100644 index 00000000..caf8d573 --- /dev/null +++ b/src/alloc2/SetupAlloc2.cpp @@ -0,0 +1,33 @@ +/** @file SetupAlloc2.cpp + * + * @author Roland Conybeare, Feb 2026 + **/ + +#include "SetupAlloc2.hpp" +#include +#include +#include + +namespace xo { + using xo::facet::FacetRegistry; + //using xo::facet::TypeRegistry; + using xo::reflect::typeseq; + + namespace mm { + + bool + SetupAlloc2::register_facets() + { + scope log(XO_DEBUG(true)); + + FacetRegistry::register_impl(); + + log && log(xtag("DArena.tseq", typeseq::id())); + + return true; + } + + } /*namespace scm*/ +} /*namespace xo*/ + +/* end SetupAlloc2.cpp */