aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/javascript/jsc/bindings/ZigGlobalObject.cpp8
-rw-r--r--src/javascript/jsc/bindings/sizes.zig6
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;