wasm-micro-runtime/core/iwasm/interpreter
Wenyong Huang 403a7d3f4f
Refine interp/aot string storage and emitting (#820)
Currently the string in the wasm/aot file will be duplicated and stored
into const string list/set in interpreter/aot loader, which leads to extra
unnecessary memory consumption if the file buffer can be referred to
after loading. We refine the string storage by:
- if the file buffer can be referred to after loading and it is writable, we
  reuse the file buffer to store the string but not store it into the const
  string set: move string backward and append '\0'
- emit string with '\0' only for XIP mode in which the AOT file is readonly
- if the file buffer cannot be referred to, e.g. in app manager, keep the
  same behavior as before

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-11-08 11:27:26 +08:00
..
iwasm_interp.cmake Implement wasm mini loader and refine footprint of loader and runtime (#276) 2020-06-08 11:19:09 +08:00
SConscript add porting codes of rt-thread (#494) 2021-01-14 11:26:35 +08:00
wasm_interp_classic.c Enable emitting custom name section to aot file (#794) 2021-10-26 16:32:52 +08:00
wasm_interp_fast.c Enable emitting custom name section to aot file (#794) 2021-10-26 16:32:52 +08:00
wasm_interp.h Apply clang-format for interpreter source files (#772) 2021-10-08 11:44:39 +08:00
wasm_loader.c Refine interp/aot string storage and emitting (#820) 2021-11-08 11:27:26 +08:00
wasm_loader.h Apply clang-format for interpreter source files (#772) 2021-10-08 11:44:39 +08:00
wasm_mini_loader.c Refine interp/aot string storage and emitting (#820) 2021-11-08 11:27:26 +08:00
wasm_opcode.h Apply clang-format for interpreter source files (#772) 2021-10-08 11:44:39 +08:00
wasm_runtime.c Fix app heap corrupted unchecked issue (#788) 2021-10-15 20:56:41 +08:00
wasm_runtime.h Apply clang-format for interpreter source files (#772) 2021-10-08 11:44:39 +08:00
wasm.h Enable emitting custom name section to aot file (#794) 2021-10-26 16:32:52 +08:00