wasm-micro-runtime/core/iwasm/common
Enrico Loparco 6b1d81650d
Allow not copying the wasm binary in wasm-c-api and not referring to the binary in wasm/aot loader (#3389)
Add flag `LoadArgs.clone_wasm_binary` to control whether to clone the wasm/aot
binary in wasm-c-api module. If false, API `wasm_module_new_ex` won't clone the
binary, which may reduce the footprint.

Add flag `LoadArgs.wasm_binary_freeable` to control whether the wasm/aot binary
may be freed after instantiation for wamr API `wasm_runtime_load_ex`, if yes, then
for some running modes, the wasm/aot module doesn't refer to the input binary
again so developer can free it after instantiation to reduce the footprint.

And add API `wasm_module_is_underlying_binary_freeable` and
`wasm_runtime_is_underlying_binary_freeable` to check whether the input binary
can be freed after instantiation for wasm-c-api and wamr api.

And add sample to illustrate it.
2024-05-17 09:00:08 +08:00
..
arch Fix clang compile warnings (#3396) 2024-05-08 16:43:47 +08:00
gc Fix some spelling issues (#3385) 2024-05-06 07:56:48 +08:00
iwasm_common.cmake Add support for universal binaries on OSX (#2060) 2023-03-30 09:53:07 +08:00
SConscript Add ia32 support and fix compiling issue for RT-Thread (#730) 2021-09-07 10:20:14 +08:00
wasm_application.c Fix some spelling issues (#3385) 2024-05-06 07:56:48 +08:00
wasm_blocking_op.c Implement async termination of blocking thread (#2516) 2023-09-20 18:11:52 +08:00
wasm_c_api_internal.h Fix some spelling issues (#3385) 2024-05-06 07:56:48 +08:00
wasm_c_api.c Allow not copying the wasm binary in wasm-c-api and not referring to the binary in wasm/aot loader (#3389) 2024-05-17 09:00:08 +08:00
wasm_exec_env.c Fix some spelling issues (#3385) 2024-05-06 07:56:48 +08:00
wasm_exec_env.h thread mgr: Free aux stack only when it was allocated (#3282) 2024-04-08 09:06:49 +08:00
wasm_loader_common.c Implement Memory64 support for AOT (#3362) 2024-05-13 11:03:38 +08:00
wasm_loader_common.h Implement Memory64 support for AOT (#3362) 2024-05-13 11:03:38 +08:00
wasm_memory.c Implement Memory64 support for AOT (#3362) 2024-05-13 11:03:38 +08:00
wasm_memory.h Implement memory64 for classic interpreter (#3266) 2024-04-02 15:22:07 +08:00
wasm_native.c Fix some spelling issues (#3385) 2024-05-06 07:56:48 +08:00
wasm_native.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
wasm_runtime_common.c Allow not copying the wasm binary in wasm-c-api and not referring to the binary in wasm/aot loader (#3389) 2024-05-17 09:00:08 +08:00
wasm_runtime_common.h Allow not copying the wasm binary in wasm-c-api and not referring to the binary in wasm/aot loader (#3389) 2024-05-17 09:00:08 +08:00
wasm_shared_memory.c Fix some more spelling issues (#3393) 2024-05-08 09:30:29 +08:00
wasm_shared_memory.h Refine lock/unlock shared memory (#2682) 2023-10-31 11:46:03 +08:00
wasm_suspend_flags.h Do not inherit WASM_SUSPEND_FLAG_BLOCKING from the parent thread (#3051) 2024-01-19 09:55:01 +08:00