xo-gc: + X1CollectorConfig.with_name()

This commit is contained in:
Roland Conybeare 2026-02-15 13:15:11 -05:00
commit 1f05a568f5
2 changed files with 14 additions and 15 deletions

View file

@ -17,7 +17,12 @@ namespace xo {
using size_type = std::size_t; using size_type = std::size_t;
/** copy of this config, /** 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); X1CollectorConfig with_size(std::size_t gen_z);

View file

@ -25,6 +25,14 @@ namespace xo {
namespace mm { namespace mm {
X1CollectorConfig
X1CollectorConfig::with_name(std::string name)
{
X1CollectorConfig copy = *this;
copy.name_ = std::move(name);
return copy;
}
X1CollectorConfig X1CollectorConfig
X1CollectorConfig::with_size(std::size_t gen_z) X1CollectorConfig::with_size(std::size_t gen_z)
{ {
@ -33,20 +41,6 @@ namespace xo {
return copy; 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::GCRunState(generation gc_upto) GCRunState::GCRunState(generation gc_upto)