wasm-micro-runtime/core/iwasm
dongsheng28849455 ba59e56e19
User defined memory allocator for different purposes (#3316)
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.
2024-04-18 19:40:57 +08:00
..
aot Enhance GC subtyping checks (#3317) 2024-04-18 12:32:01 +08:00
common User defined memory allocator for different purposes (#3316) 2024-04-18 19:40:57 +08:00
compilation Enhance GC subtyping checks (#3317) 2024-04-18 12:32:01 +08:00
doc Add architecture diagram for wasm globals and classic-interp stack frame (#2058) 2023-03-25 09:39:20 +08:00
fast-jit thread mgr: Free aux stack only when it was allocated (#3282) 2024-04-08 09:06:49 +08:00
include User defined memory allocator for different purposes (#3316) 2024-04-18 19:40:57 +08:00
interpreter Enhance GC subtyping checks (#3317) 2024-04-18 12:32:01 +08:00
libraries thread mgr: Free aux stack only when it was allocated (#3282) 2024-04-08 09:06:49 +08:00
README.md Add architecture diagram for wasm globals and classic-interp stack frame (#2058) 2023-03-25 09:39:20 +08:00