From 2c21eede1fcd1082463a877740d60c383c542fff Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 20 Nov 2025 21:26:18 -0500 Subject: [PATCH] xo-interpreter: setting up for gc in interactive interpreter --- include/xo/alloc/GC.hpp | 4 ++-- src/alloc/GC.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xo/alloc/GC.hpp b/include/xo/alloc/GC.hpp index abbb9657..ce7b0f85 100644 --- a/include/xo/alloc/GC.hpp +++ b/include/xo/alloc/GC.hpp @@ -37,14 +37,14 @@ namespace xo { * pages are committed on demand. * Initial committment will be up to @ref incr_gc_threshold_ **/ - std::size_t initial_nursery_z_ = 0; + std::size_t initial_nursery_z_ = 64*1024*1024; /** initial size in bytes for oldest (Tenured) generation. * GC allocates two tenured spaces of this size. * This number represents reserved address space. * pages are committed on demand. * Initial committment will be up to @ref full_gc_threshold_ **/ - std::size_t initial_tenured_z_ = 0; + std::size_t initial_tenured_z_ = 128*1024*1024; /** trigger incremental GC after this many bytes allocated in nursery **/ std::size_t incr_gc_threshold_ = 64*1024; /** trigger full GC after this many bytes promoted to tenured **/ diff --git a/src/alloc/GC.cpp b/src/alloc/GC.cpp index 8181cbb1..22654700 100644 --- a/src/alloc/GC.cpp +++ b/src/alloc/GC.cpp @@ -73,7 +73,7 @@ namespace xo { } if (nursery_size + config_.full_gc_threshold_ > tenured_size) { - throw std::runtime_error(tostr("GC::ctor: expected nursery size + tennured gc threshold < tenured size", + throw std::runtime_error(tostr("GC::ctor: expected nursery size + tenured gc threshold < tenured size", xtag("nursery-size", nursery_size), xtag("tenured-size", tenured_size), xtag("full-gc-threshold", config_.full_gc_threshold_)