Move application entry APIs out of wasm_runtime_common.c (#639)
And fix libc-builtin print float issue Add a list to track all third party components Fix compile error when MEMORY_TRACING is enabled Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -46,13 +46,6 @@ gc_init_internal(gc_heap_t *heap, char *base_addr, gc_size_t heap_max_size)
|
||||
|
||||
bh_assert(root->size <= HMU_FC_NORMAL_MAX_SIZE);
|
||||
|
||||
#if WASM_ENABLE_MEMORY_TRACING != 0
|
||||
os_printf("Heap created, total size: %u\n", buf_size);
|
||||
os_printf(" heap struct size: %u\n", sizeof(gc_heap_t));
|
||||
os_printf(" actual heap size: %u\n", heap_max_size);
|
||||
os_printf(" padding bytes: %u\n",
|
||||
buf_size - sizeof(gc_heap_t) - heap_max_size);
|
||||
#endif
|
||||
return heap;
|
||||
}
|
||||
|
||||
@ -74,6 +67,13 @@ gc_init_with_pool(char *buf, gc_size_t buf_size)
|
||||
base_addr = (char*) (((uintptr_t) base_addr + 7) & (uintptr_t)~7) + GC_HEAD_PADDING;
|
||||
heap_max_size = (uint32)(buf_end - base_addr) & (uint32)~7;
|
||||
|
||||
#if WASM_ENABLE_MEMORY_TRACING != 0
|
||||
os_printf("Heap created, total size: %u\n", buf_size);
|
||||
os_printf(" heap struct size: %u\n", sizeof(gc_heap_t));
|
||||
os_printf(" actual heap size: %u\n", heap_max_size);
|
||||
os_printf(" padding bytes: %u\n",
|
||||
buf_size - sizeof(gc_heap_t) - heap_max_size);
|
||||
#endif
|
||||
return gc_init_internal(heap, base_addr, heap_max_size);
|
||||
}
|
||||
|
||||
@ -110,6 +110,14 @@ gc_init_with_struct_and_pool(char *struct_buf, gc_size_t struct_buf_size,
|
||||
|
||||
heap_max_size = (uint32)(pool_buf_end - base_addr) & (uint32)~7;
|
||||
|
||||
#if WASM_ENABLE_MEMORY_TRACING != 0
|
||||
os_printf("Heap created, total size: %u\n",
|
||||
struct_buf_size + pool_buf_size);
|
||||
os_printf(" heap struct size: %u\n", sizeof(gc_heap_t));
|
||||
os_printf(" actual heap size: %u\n", heap_max_size);
|
||||
os_printf(" padding bytes: %u\n",
|
||||
pool_buf_size - heap_max_size);
|
||||
#endif
|
||||
return gc_init_internal(heap, base_addr, heap_max_size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user