-
Notifications
You must be signed in to change notification settings - Fork 646
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
14 changed files
with
276 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.