Please help with more information or direction to more information on this and related topics. It seems that this part of mJS and Mongoose OS are not well used, but are potentially very useful. There is at least one problem/inconsistency/bug in Sys.calloc(x,y)
api_sys.js has several memory management FFI calls:
Sys._sbuf is a "helper" function. What does it do, and how to use it?
Sys.calloc(x,y) is described, but does not work (because there is no FFI call to calloc anywhere in api_sys.js).
There IS a malloc FFI call. What does it do, and how to use it?
Built in mJS API
let s = mkstr(ptrVar, length);
Create a string backed by a C memory chunk. A string s starts at memory location ptrVar, and is length bytes long.
What does this do? What is the usage? What does the C string look like?