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

@ -184,7 +184,7 @@ wasm_native_register_natives(const char *module_name,
{
NativeSymbolsNode *node;
if (!(node = bh_malloc(sizeof(NativeSymbolsNode))))
if (!(node = wasm_runtime_malloc(sizeof(NativeSymbolsNode))))
return false;
node->module_name = module_name;
@ -256,7 +256,7 @@ wasm_native_destroy()
node = g_native_symbols_list;
while (node) {
node_next = node->next;
bh_free(node);
wasm_runtime_free(node);
node = node_next;
}