Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsc default create 128M MemoryPoolSize on arm64, that's to big #154

Open
jinshiyi11 opened this issue Jul 31, 2021 · 2 comments
Open

jsc default create 128M MemoryPoolSize on arm64, that's to big #154

jinshiyi11 opened this issue Jul 31, 2021 · 2 comments

Comments

@jinshiyi11
Copy link

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
Copy link
Author

can i use

JSC::Options::jitMemoryReservationSize()

to change the default jit memory?

@jinshiyi11
Copy link
Author

I found that we can set environment variables to set default values of JSC::Options

Os.setenv("JSC_jitMemoryReservationSize", "16777216", true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant