Skip to content

Commit ce31b24

Browse files
committed
Increase memory again
1 parent 6b1dbab commit ce31b24

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/build-and-test-wasm.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,12 @@ run_tests() {
183183
# during XCTest's PrintObserver date formatting which uses ICU/Foundation
184184
# and can consume significant memory. The default stack (1MB) and memory
185185
# limits are insufficient for SwiftWasm's Foundation date formatting.
186+
# ICU's SimpleDateFormat allocates memory dynamically when formatting dates,
187+
# and insufficient memory causes dlmalloc failures with stack traces showing
188+
# icu::SimpleDateFormat::format -> icu::UMemory::operator new -> malloc -> dlmalloc
186189
WASMTIME_FLAGS="--dir ."
187-
WASMTIME_FLAGS="$WASMTIME_FLAGS -W max-wasm-stack=16777216"
188-
WASMTIME_FLAGS="$WASMTIME_FLAGS -W max-memory-size=536870912"
190+
WASMTIME_FLAGS="$WASMTIME_FLAGS -W max-wasm-stack=33554432"
191+
WASMTIME_FLAGS="$WASMTIME_FLAGS -W max-memory-size=1073741824"
189192
if echo "$SWIFT_SDK_NAME" | grep -q "threads"; then
190193
WASMTIME_FLAGS="$WASMTIME_FLAGS --wasm threads=y --wasi threads=y"
191194
fi

0 commit comments

Comments
 (0)