mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 23:42:05 +00:00
ba59e56e19
Some issues are related with memory fragmentation, which may cause the linear memory cannot be allocated. In WAMR, the memory managed by the system is often trivial, but linear memory usually directly allocates a large block and often remains unchanged for a long time. Their sensitivity and contribution to fragmentation are different, which is suitable for different allocation strategies. If we can control the linear memory's allocation, do not make it from system heap, the overhead of heap management might be avoided. Add `mem_alloc_usage_t usage` as the first argument for user defined malloc/realloc/free functions when `WAMR_BUILD_ALLOC_WITH_USAGE` cmake variable is set as 1, and make passing `Alloc_For_LinearMemory` to the argument when allocating the linear memory. |
||
---|---|---|
.. | ||
arch | ||
gc | ||
iwasm_common.cmake | ||
SConscript | ||
wasm_application.c | ||
wasm_blocking_op.c | ||
wasm_c_api_internal.h | ||
wasm_c_api.c | ||
wasm_exec_env.c | ||
wasm_exec_env.h | ||
wasm_memory.c | ||
wasm_memory.h | ||
wasm_native.c | ||
wasm_native.h | ||
wasm_runtime_common.c | ||
wasm_runtime_common.h | ||
wasm_shared_memory.c | ||
wasm_shared_memory.h | ||
wasm_suspend_flags.h |