diff --git a/include/lwnode/lwnode-version.h b/include/lwnode/lwnode-version.h index 43c33f4325..296afca10a 100644 --- a/include/lwnode/lwnode-version.h +++ b/include/lwnode/lwnode-version.h @@ -18,5 +18,5 @@ #define LWNODE_VERSION_MAJOR 1 #define LWNODE_VERSION_MINOR 1 - #define LWNODE_VERSION_PATCH 22 - #define LWNODE_VERSION_TAG "v1.1.22" + #define LWNODE_VERSION_PATCH 23 + #define LWNODE_VERSION_TAG "v1.1.23" diff --git a/src/api/engine.cc b/src/api/engine.cc index 79ec26e441..b4d79974d3 100644 --- a/src/api/engine.cc +++ b/src/api/engine.cc @@ -353,6 +353,7 @@ bool Engine::Dispose() { } #define DEFAULT_GC_FREE_SPACE_DIVISOR 24 +#define DEFAULT_GC_HEAP_SIZE 1024 * 1024 * 4 void Engine::initialize() { #ifndef NDEBUG @@ -374,6 +375,11 @@ void Engine::initialize() { gcFreeSpaceDivisor = DEFAULT_GC_FREE_SPACE_DIVISOR; } + // Increase the heap size explicitly for performance + int result = GC_expand_hp(DEFAULT_GC_HEAP_SIZE); + LWNODE_DLOG_INFO( + "DEFAULT_GC_HEAP_SIZE: %d result: %d", DEFAULT_GC_HEAP_SIZE, result); + Memory::setGCFrequency(gcFreeSpaceDivisor); gcHeap_.reset(GCHeap::create());