Add a new API to get free memory in memory pool (#1430)

This commit is contained in:
Huang Qi
2022-08-31 16:39:25 +08:00
committed by GitHub
parent e0c2acd178
commit 77c516ac80
4 changed files with 32 additions and 0 deletions

View File

@ -167,3 +167,12 @@ wasm_runtime_free(void *ptr)
{
wasm_runtime_free_internal(ptr);
}
bool
wasm_runtime_get_mem_alloc_info(mem_alloc_info_t *mem_alloc_info)
{
if (memory_mode == MEMORY_MODE_POOL) {
return mem_allocator_get_alloc_info(pool_allocator, mem_alloc_info);
}
return false;
}