You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to use the following version of malloc in my source code:
(i64) -> i32
But I only found the following version of malloc in emscripten: (i32) -> i32
Does emscripten support other library functions including malloc in i64 version? If not, will it be realized in the future?
If I were to implement other library functions for the i64 version myself, how would I proceed? give me some suggestions, thanks.
The text was updated successfully, but these errors were encountered:
I'm not quite sure I understand your question. The malloc function takes size_t argument and returns a pointer. This means under -sMEMORY64 it will take and return i64 and by default (with wasm32) it will take and return i32.
I don't think size_t can ever be different from pointer size on any platform so I don't see how the return type and the arg type could ever differ.
Thanks for reply. I understand. And how to use Memory64 in emscripten (version 3.1.14)? I did not find any running programs and commands on official or other sources. Can you give an example to illustrate how to use Memory64?
You can find working examples in the test suite by searching for that flag, MEMORY64.
But 3.1.14 may not be new enough. Looking in the changelog, 3.1.49 had many relevant fixes, and only in 3.1.72 was the flag no longer experimental. I would recommend using the latest version.
I need to use the following version of malloc in my source code:
(i64) -> i32
But I only found the following version of malloc in emscripten:
(i32) -> i32
Does emscripten support other library functions including malloc in i64 version? If not, will it be realized in the future?
If I were to implement other library functions for the i64 version myself, how would I proceed? give me some suggestions, thanks.
The text was updated successfully, but these errors were encountered: