Hi, I am starting my journey with WAMR, trying to figure out if it would be well suited for our next project. For now, I am trying to comile and run the "hello world" (from here https://wamr.gitbook.io/document/basics/getting-started/on_host). I basically copy/pasted the commands from the "host preparation" and running the program on host. Everything seems to install and compile perfectly, with no error. And at runtime I get:
-> % ./iwasm test.wasm
[21:49:39:153 - 7F08B87FBB80]: warning: allocate 16 bytes memory failed
Exception: allocate memory failed
Any hint on what might be the issue?
What platform and architecture are you on?
sorry I forgot to mention : I tried on ubuntu 24 and WSL hosting a ubuntu 20.
May I ask which repo or branch you are using? Since there is no "app-samples" in https://github.com/bytecodealliance/wasm-micro-runtime currently
Here it is : https://github.com/bytecodealliance/wasm-micro-runtime/tree/main/product-mini/app-samples
@Gilles ORAZI currently the default host managed heap size is set 0 when libc wasi is compiled, but the wasm file without libc wasi enabled may require host managed heap to run, could you try iwasm --heap-size=16384 test.wasm
?
@Wenyong Huang That works perfectly now. Thank you so much !
Last updated: Dec 23 2024 at 12:05 UTC