jsc default create 128M MemoryPoolSize on arm64, that's to big
jinshiyi11 opened this issue · 2 comments
jinshiyi11 commented
Issue Description
jsc default create 128M MemoryPoolSize on arm64,in JavaScriptCore\jit\ExecutableAllocator.cpp
,this to big and may cause oom on old android device
#if defined(FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB) && FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB > 0
static const size_t fixedExecutableMemoryPoolSize = FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB * 1024 * 1024;
#elif CPU(ARM)
static const size_t fixedExecutableMemoryPoolSize = 16 * 1024 * 1024;
#elif CPU(ARM64)
static const size_t fixedExecutableMemoryPoolSize = 128 * 1024 * 1024;
#elif CPU(X86_64)
static const size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024;
#else
static const size_t fixedExecutableMemoryPoolSize = 32 * 1024 * 1024;
#endif
Version, config, any additional info
version v250230.2.1
jinshiyi11 commented
can i use
JSC::Options::jitMemoryReservationSize()
to change the default jit memory?
jinshiyi11 commented
I found that we can set environment variables to set default values of JSC::Options
Os.setenv("JSC_jitMemoryReservationSize", "16777216", true);