fix exec_env not checked issue, export __heap_base and __data_end in sample to decrease memory usage (#371)
This commit is contained in:
@ -84,16 +84,17 @@ WASMExecEnv *
|
||||
wasm_exec_env_create(struct WASMModuleInstanceCommon *module_inst,
|
||||
uint32 stack_size)
|
||||
{
|
||||
WASMExecEnv *exec_env = wasm_exec_env_create_internal(module_inst,
|
||||
stack_size);
|
||||
WASMExecEnv *exec_env =
|
||||
wasm_exec_env_create_internal(module_inst, stack_size);
|
||||
|
||||
if (!exec_env)
|
||||
return NULL;
|
||||
|
||||
/* Set the aux_stack_boundary to 0 */
|
||||
exec_env->aux_stack_boundary = 0;
|
||||
#if WASM_ENABLE_THREAD_MGR != 0
|
||||
WASMCluster *cluster;
|
||||
|
||||
if (!exec_env)
|
||||
return NULL;
|
||||
|
||||
/* Create a new cluster for this exec_env */
|
||||
cluster = wasm_cluster_create(exec_env);
|
||||
if (!cluster) {
|
||||
|
||||
Reference in New Issue
Block a user