Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6acf777

Browse files
authored
gh-120507: Double WASI memory (#120648)
Use 16 MiB stack with 40 MiB memory limit, instead of 8 MiB stackwith 20 MiB memory limit.
1 parent0506f75 commit6acf777

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

‎Tools/wasm/wasi.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,8 @@ def main():
280280
default_host_runner= (f"{shutil.which('wasmtime')} run "
281281
# Make sure the stack size will work for a pydebug
282282
# build.
283-
# The 8388608 value comes from `ulimit -s` under Linux
284-
# which equates to 8291 KiB.
285-
"--wasm max-wasm-stack=8388608 "
283+
# Use 16 MiB stack.
284+
"--wasm max-wasm-stack=16777216 "
286285
# Use WASI 0.2 primitives.
287286
"--wasi preview2 "
288287
# Enable thread support; causes use of preview1.

‎Tools/wasm/wasm_build.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def _check_wasi() -> None:
329329
# workaround for https://github.com/python/cpython/issues/95952
330330
"HOSTRUNNER": (
331331
"wasmtime run "
332-
"--wasm max-wasm-stack=8388608 "
332+
"--wasm max-wasm-stack=16777216 "
333333
"--wasi preview2 "
334334
"--dir {srcdir}::/ "
335335
"--env PYTHONPATH=/{relbuilddir}/build/lib.wasi-wasm32-{version}:/Lib"

‎configure‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ then
16091609
dnl TODO: support other WASI runtimes
16101610
dnl wasmtime starts the proces with "/" as CWD. For OOT builds add the
16111611
dnl directory containing _sysconfigdata to PYTHONPATH.
1612-
[WASI/*],[HOSTRUNNER='wasmtime run --wasm max-wasm-stack=8388608 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'],
1612+
[WASI/*],[HOSTRUNNER='wasmtime run --wasm max-wasm-stack=16777216 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'],
16131613
[HOSTRUNNER='']
16141614
)
16151615
fi
@@ -2403,10 +2403,10 @@ AS_CASE([$ac_sys_system],
24032403
AS_VAR_APPEND([LDFLAGS_NODIST],[" -Wl,--max-memory=10485760"])
24042404
])
24052405
2406-
dnl gh-117645: Set the memory size to20 MiB, the stack size to8 MiB,
2406+
dnl gh-117645: Set the memory size to40 MiB, the stack size to16 MiB,
24072407
dnl and move the stack first.
24082408
dnl https://github.com/WebAssembly/wasi-libc/issues/233
2409-
AS_VAR_APPEND([LDFLAGS_NODIST],[" -z stack-size=8388608 -Wl,--stack-first -Wl,--initial-memory=20971520"])
2409+
AS_VAR_APPEND([LDFLAGS_NODIST],[" -z stack-size=16777216 -Wl,--stack-first -Wl,--initial-memory=41943040"])
24102410
]
24112411
)
24122412

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp