wasm-malloc icon indicating copy to clipboard operation
wasm-malloc copied to clipboard

a problem with grow_memory

Open beProsto opened this issue 4 years ago • 1 comments

I've had a problem trying to compile this project with clang on windows. Specifically during the compilation of malloc.c; It seems like __builtin_wasm_grow_memory(pages) is no more in clang? Instead i had to use __builtin_wasm_memory_grow(0, pages) :D

So my question is, as i can see this project was made for compilation on linux, does clang on linux have other builtins? I don't have enough space on my hard drive to test that at the moment. :/

The other question of mine would be whether or not could you change it in the project? :D Or if i can make a pull request or something changing it?

Or if, maybe, memory_grow is somehow different to grow_memory?

beProsto avatar Jan 08 '22 17:01 beProsto

Sorry, I somehow wasn't notified about this issue... It seems like the clang builtin function has indeed been renamed: https://github.com/WebAssembly/spec/issues/627. You can go ahead and create a pull request if you like, I'd very much appreciate it!

maxkl avatar Feb 14 '22 23:02 maxkl