diff --git a/cmake/RuntimeConfig.cmake b/cmake/RuntimeConfig.cmake index 46bd00fda..33008c85b 100644 --- a/cmake/RuntimeConfig.cmake +++ b/cmake/RuntimeConfig.cmake @@ -25,6 +25,9 @@ else() set(HDR_MASK -16888498602639361) # 0xffc3ffffffffffff endif() +set(HYPERBLOCK_SIZE_MULTIPLIER 1024 + CACHE STRING "Default Multiplier for Arena Semispaces size") + set(MAP_LAYOUT 1) set(LIST_LAYOUT 2) set(SET_LAYOUT 3) diff --git a/config/macros.h b/config/macros.h index 30202aed8..6723631c1 100644 --- a/config/macros.h +++ b/config/macros.h @@ -15,6 +15,8 @@ #define TAG_MASK @TAG_MASK@LL #define LENGTH_MASK @LENGTH_MASK@ +#define HYPERBLOCK_SIZE_MULTIPLIER @HYPERBLOCK_SIZE_MULTIPLIER@ + #define MAP_LAYOUT @MAP_LAYOUT@ #define LIST_LAYOUT @LIST_LAYOUT@ #define SET_LAYOUT @SET_LAYOUT@ diff --git a/include/runtime/arena.h b/include/runtime/arena.h index ea081766a..ba18ff966 100644 --- a/include/runtime/arena.h +++ b/include/runtime/arena.h @@ -8,11 +8,13 @@ #include #include +#include "config/macros.h" #include "runtime/alloc.h" extern "C" { -size_t const HYPERBLOCK_SIZE = (size_t)BLOCK_SIZE * 1024 * 1024; +size_t const HYPERBLOCK_SIZE + = (size_t)BLOCK_SIZE * HYPERBLOCK_SIZE_MULTIPLIER * 1024; // After a garbage collect we change the tripwire to the amount of non-garbage times // this factor, so we do a decent amount of allocations between collections even