xo-interpreter: setting up for gc in interactive interpreter

This commit is contained in:
Roland Conybeare 2025-11-20 21:26:18 -05:00
commit 2c21eede1f
2 changed files with 3 additions and 3 deletions

View file

@ -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 **/

View file

@ -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_)