diff --git a/xo-gc/include/xo/gc/X1CollectorConfig.hpp b/xo-gc/include/xo/gc/X1CollectorConfig.hpp index 54296e2c..dec9545d 100644 --- a/xo-gc/include/xo/gc/X1CollectorConfig.hpp +++ b/xo-gc/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/xo-gc/src/gc/DX1Collector.cpp b/xo-gc/src/gc/DX1Collector.cpp index a4375da5..ede4a734 100644 --- a/xo-gc/src/gc/DX1Collector.cpp +++ b/xo-gc/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)