From 017397117c366d548b6a164be08450f7a771d3e6 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 15 Dec 2025 01:05:38 -0500 Subject: [PATCH] xo-alloc2: + comments --- .../include/xo/alloc2/gc/IAllocator_DX1Collector.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xo-alloc2/include/xo/alloc2/gc/IAllocator_DX1Collector.hpp b/xo-alloc2/include/xo/alloc2/gc/IAllocator_DX1Collector.hpp index f769fd56..138cce88 100644 --- a/xo-alloc2/include/xo/alloc2/gc/IAllocator_DX1Collector.hpp +++ b/xo-alloc2/include/xo/alloc2/gc/IAllocator_DX1Collector.hpp @@ -36,20 +36,31 @@ namespace xo { // todo: available() static std::string_view name(const DX1Collector &) noexcept; + /** reserved memory across all {roles, generations} **/ static size_type reserved(const DX1Collector &) noexcept; static size_type size(const DX1Collector &) noexcept; + /** committed size accross all {roles, generations} **/ static size_type committed(const DX1Collector &) noexcept; + /** available (committed but unused) space across all {roles, generations} **/ static size_type available(const DX1Collector &) noexcept; + /** space used by @p d across all {roles, generations}. **/ static size_type allocated(const DX1Collector &) noexcept; + /** true iff address @p p comes from collector @p d **/ static bool contains(const DX1Collector & d, const void * p) noexcept; + /** report last error, if any, for collector @p d **/ static AllocatorError last_error(const DX1Collector &) noexcept; + /** expand gen0 spaces (both from-space and to-space) **/ static bool expand(DX1Collector & d, size_type z) noexcept; + /** always alloc in gen0 to-space **// static value_type alloc(DX1Collector & d, size_type z); static value_type super_alloc(DX1Collector & d, size_type z); static value_type sub_alloc(DX1Collector & d, size_type z, bool complete); + + /** reset to empty state; clears all generations **/ static void clear(DX1Collector & d); + /** invoke destructor **/ static void destruct_data(DX1Collector & d); };