From 01c63418fdabca49eed1da79bbbeeaf6c971601e Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 15 Feb 2026 13:15:11 -0500 Subject: [PATCH] xo-gc: + X1CollectorConfig.with_name() --- include/xo/gc/X1CollectorConfig.hpp | 7 ++++++- src/gc/DX1Collector.cpp | 22 ++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/include/xo/gc/X1CollectorConfig.hpp b/include/xo/gc/X1CollectorConfig.hpp index 54296e2..dec9545 100644 --- a/include/xo/gc/X1CollectorConfig.hpp +++ b/include/xo/gc/X1CollectorConfig.hpp @@ -17,7 +17,12 @@ namespace xo { using size_type = std::size_t; /** copy of this config, - * with @c arena_config_.size_ set to @p gen_z + * but with @ref name_ set to @p name + **/ + X1CollectorConfig with_name(std::string name); + + /** copy of this config, + * but with @c arena_config_.size_ set to @p gen_z **/ X1CollectorConfig with_size(std::size_t gen_z); diff --git a/src/gc/DX1Collector.cpp b/src/gc/DX1Collector.cpp index a4375da..ede4a73 100644 --- a/src/gc/DX1Collector.cpp +++ b/src/gc/DX1Collector.cpp @@ -25,6 +25,14 @@ namespace xo { namespace mm { + X1CollectorConfig + X1CollectorConfig::with_name(std::string name) + { + X1CollectorConfig copy = *this; + copy.name_ = std::move(name); + return copy; + } + X1CollectorConfig X1CollectorConfig::with_size(std::size_t gen_z) { @@ -33,20 +41,6 @@ namespace xo { return copy; } -#ifdef NOT_USING - constexpr std::uint64_t - X1CollectorConfig::gen_mult() const { - return 1ul << arena_config_.header_size_bits_; - } -#endif - -#ifdef NOT_USING - constexpr std::uint64_t - X1CollectorConfig::tseq_mult() const { - return 1ul << (gen_bits_ + arena_config_.header_size_bits_); - } -#endif - // ----- GCRunState ----- GCRunState::GCRunState(generation gc_upto)