diff options
author | 2021-09-05 16:48:26 -0700 | |
---|---|---|
committer | 2021-09-05 16:48:26 -0700 | |
commit | 2c429f7732011fa7fa9ff68eb9c251ef79f9b77b (patch) | |
tree | 111f0384741b71f37e0f4b751047550507ae1fd8 /src/javascript/jsc | |
parent | 4f966f30a59a9c7801d5e6712608de0ae82e584b (diff) | |
download | bun-2c429f7732011fa7fa9ff68eb9c251ef79f9b77b.tar.gz bun-2c429f7732011fa7fa9ff68eb9c251ef79f9b77b.tar.zst bun-2c429f7732011fa7fa9ff68eb9c251ef79f9b77b.zip |
guess
Former-commit-id: 6e95bd8a1457d3c514adb0af6ae0c5feb1564a80
Diffstat (limited to 'src/javascript/jsc')
-rw-r--r-- | src/javascript/jsc/bindings/ZigGlobalObject.cpp | 8 | ||||
-rw-r--r-- | src/javascript/jsc/bindings/sizes.zig | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/javascript/jsc/bindings/ZigGlobalObject.cpp b/src/javascript/jsc/bindings/ZigGlobalObject.cpp index 2b95b108a..edebae6de 100644 --- a/src/javascript/jsc/bindings/ZigGlobalObject.cpp +++ b/src/javascript/jsc/bindings/ZigGlobalObject.cpp @@ -93,7 +93,13 @@ extern "C" JSC__JSGlobalObject *Zig__GlobalObject__create(JSClassRef *globalObje // JSC::Options::useCodeCache() = false; - JSC::VM &vm = JSC::VM::create(JSC::LargeHeap).leakRef(); +#ifdef WTF_CPU_ARM64 + auto heapSize = JSC::SmallHeap; +#else + auto heapSize = JSC::LargeHeap; +#endif + + JSC::VM &vm = JSC::VM::create(heapSize).leakRef(); vm.heap.acquireAccess(); #if ENABLE(WEBASSEMBLY) JSC::Wasm::enableFastMemory(); diff --git a/src/javascript/jsc/bindings/sizes.zig b/src/javascript/jsc/bindings/sizes.zig index 3eb86f2fb..7b00cf3ce 100644 --- a/src/javascript/jsc/bindings/sizes.zig +++ b/src/javascript/jsc/bindings/sizes.zig @@ -6,13 +6,13 @@ // 1. We can't dynamically link JavaScriptCore // 2. It's important that this is run whenever JavaScriptCore is updated or the bindings on the Zig side change. // Failure to do so will lead to undefined behavior and probably some frustrated people. -// --- Regenerate this: --- +// --- Regenerate this: --- // 1. "make jsc-bindings-headers" -// 2. "makpe sizegen" +// 2. "make sizegen" // 3. "make jsc-bindings-headers" // ------------------------ // You can verify the numbers written in this file at runtime via the `extern`d types -// Run "jsc-bindings-headers" twice because it uses these values in the output. That's how all the bJSC__.* types are created - from these values. +// Run "jsc-bindings-headers" twice because it uses these values in the output. That's how all the bJSC__.* types are created - from these values. pub const JSC__JSObject = 16; pub const JSC__JSObject_align = 8; pub const JSC__JSCell = 8; |