Re-org memory allocation interfaces, add --stack-size and --heap-size option (#193)

This commit is contained in:
wenyongh
2020-03-10 19:54:44 +08:00
committed by GitHub
parent 381859d530
commit 0fdd49ea31
110 changed files with 1264 additions and 2125 deletions

View File

@ -107,7 +107,7 @@ timer_ctx_t create_wasm_timer_ctx(unsigned int module_id, int prealloc_num)
return NULL;
timer_ctx_node_t * node = (timer_ctx_node_t*)
bh_malloc(sizeof(timer_ctx_node_t));
wasm_runtime_malloc(sizeof(timer_ctx_node_t));
if (node == NULL) {
destroy_timer_ctx(ctx);
return NULL;
@ -131,7 +131,7 @@ void destroy_module_timer_ctx(unsigned int module_id)
if (timer_ctx_get_owner(elem->timer_ctx) == module_id) {
bh_list_remove(&g_timer_ctx_list, elem);
destroy_timer_ctx(elem->timer_ctx);
bh_free(elem);
wasm_runtime_free(elem);
break;
}