mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-07-15 08:48:33 +00:00
Revert WASM_STACK_GUARD_SIZE to 1024 for non-posix platforms
Also, add comments.
This commit is contained in:
parent
1e1fffc02b
commit
0e6dfa1b38
|
@ -486,7 +486,26 @@
|
||||||
/* UVWASI requires larger native stack */
|
/* UVWASI requires larger native stack */
|
||||||
#define WASM_STACK_GUARD_SIZE (4096 * 6)
|
#define WASM_STACK_GUARD_SIZE (4096 * 6)
|
||||||
#else
|
#else
|
||||||
|
/*
|
||||||
|
* Use a larger default for platforms like macOS/Linux.
|
||||||
|
*
|
||||||
|
* For example, wasm_interp_call_func_bytecode + wasm_runtime_set_exception
|
||||||
|
* would consume >4KB stack on x86-64 macOS.
|
||||||
|
*
|
||||||
|
* Although product-mini/platforms/nuttx always overrides
|
||||||
|
* WASM_STACK_GUARD_SIZE, exclude NuttX here just in case.
|
||||||
|
*/
|
||||||
|
#if defined(__APPLE__) || (defined(__unix__) && !defined(__NuttX__))
|
||||||
#define WASM_STACK_GUARD_SIZE (1024 * 5)
|
#define WASM_STACK_GUARD_SIZE (1024 * 5)
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* Otherwise, assume very small requirement for now.
|
||||||
|
*
|
||||||
|
* Embedders for very small devices likely fine-tune WASM_STACK_GUARD_SIZE
|
||||||
|
* for their specific applications anyway.
|
||||||
|
*/
|
||||||
|
#define WASM_STACK_GUARD_SIZE 1024
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user