YAMAMOTO Takashi
YAMAMOTO Takashi
> Luck for us, some function, like `wasm_const_str_list_insert()`, `aot_const_str_set_insert()`, have a flag to control copying. All we need is to go through. iirc, it isn't by luck. it's for app-manager,...
> > which is basically same as what this PR seems trying. > > This PR is not about stream-loading. It tries to save memory when using WAMR by allowing...
iirc, one of implications of is_load_from_file_buf=false is to make a copy. i guess you can somehow use it.
> > iirc, one of implications of is_load_from_file_buf=false is to make a copy. i guess you can somehow use it. > > I see that a copy is done anyway...
my impression is that this requires users too much implementation knowledge. how about providing an api to query if it's safe to free the buffer? eg. ```c bool has_reference_to_underlying_byte_vec(const wasm_module_t...
> > @eloparco just my suggestion: maybe we can add two APIs, one is for WAMR api and is added in wasm_export.h, the other is for wasm-c-api and is added...
> I wouldn't add a check on that why not?
> while, in classic interpreter mode, after instantiation. i believe you can't free the buffer for classic interpreter.
> > > while, in classic interpreter mode, after instantiation. > > > > > > i believe you can't free the buffer for classic interpreter. > > Agree, how...
> Please refer to widely used wasi-sdk and llvm does if you have any concerns: https://github.com/llvm/llvm-project/blob/de3e4a9dfe89dfc0a4d6d5e0891c542f6c82ca57/llvm/cmake/modules/HandleLLVMStdlib.cmake#L35 > > https://github.com/WebAssembly/wasi-sdk/blob/99abb024209dc7a9a8d8f3eb6d03908a18bb0594/Makefile#L84 > > Static link stdc++ should be except increase the binary...