File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ WASM_LIBS = $(shell $(PKG_CONFIG) $(WASM_DEPS) $(PROTO_DEPS) \
3434EMSCRIPTEN_LINK_OPTS := --no-entry \
3535 --js-library ${PROXY_WASM_CPP_SDK}/proxy_wasm_intrinsics.js \
3636 -sSTANDALONE_WASM -sEXPORTED_FUNCTIONS=_malloc \
37- -sALLOW_MEMORY_GROWTH=1 -sSTACK_SIZE=256KB - sINITIAL_HEAP=1MB
37+ -sALLOW_MEMORY_GROWTH=1 -sINITIAL_HEAP=64KB
3838
3939
4040debug-deps :
Original file line number Diff line number Diff line change @@ -102,14 +102,8 @@ def proxy_wasm_cc_binary(
102102 "-sEXPORTED_FUNCTIONS=_malloc" ,
103103 # Allow allocating memory past initial heap size
104104 "-sALLOW_MEMORY_GROWTH=1" ,
105- # Total stack size (fixed). Emscripten default stack size changed from 5MiB to 64KiB in
106- # 3.1.27: https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md,
107- # https://github.com/emscripten-core/emscripten/pull/18191. We pick 256KB as a balance
108- # between reducing memory size and providing more headroom in case of deeper call
109- # stacks. For comparison, the Rust SDK uses 1MB stack by default.
110- "-sSTACK_SIZE=256KB" ,
111- # Initial amount of heap memory
112- "-sINITIAL_HEAP=1MB" ,
105+ # Initial amount of heap memory. 64KB matches Rust SDK starting heap size.
106+ "-sINITIAL_HEAP=64KB" ,
113107 ],
114108 tags = tags + [
115109 "manual" ,
You can’t perform that action at this time.
0 commit comments