Enable aux stack allocations on application heap (#1799)

This is necessary for WASI threads as the aux stack should be managed by the application.
See https://github.com/bytecodealliance/wasm-micro-runtime/issues/1790 for details.
This commit is contained in:
Marcin Kolny
2022-12-19 02:58:12 +00:00
committed by GitHub
parent 8fc641377a
commit 0f637cff07
7 changed files with 72 additions and 26 deletions

View File

@ -26,14 +26,16 @@ struct WASMCluster {
korp_mutex lock;
bh_list exec_env_list;
#if WASM_ENABLE_HEAP_AUX_STACK_ALLOCATION == 0
/* The aux stack of a module with shared memory will be
divided into several segments. This array store the
stack top of different segments */
uint32 *stack_tops;
/* Size of every stack segment */
uint32 stack_size;
/* Record which segments are occupied */
bool *stack_segment_occupied;
#endif
/* Size of every stack segment */
uint32 stack_size;
#if WASM_ENABLE_DEBUG_INTERP != 0
WASMDebugInstance *debug_inst;
#endif