Allocate a byte array for a string and return the offset of the byte array.
The string to allocate.
The offset of the byte array.
Allocate space for pointers.
Number of pointers.
The allocated pointer array.
Allocate space by number of bytes
Number of bytes.
Allocate then set the argument location with a TVMByteArray. Allocate new temporary space for bytes.
The offset to set ot data pointer.
The string content.
Allocate then set C-String pointer to the offset. This function will call into allocBytes to allocate necessary data. The address won't be set immediately(because the possible change of basePtr) and will be filled when we commit the data.
The offset to set ot data pointer.
The string content.
Commit all the cached data to WasmMemory. This function can only be called once. No further store function should be called.
Number of bytes to be stored.
Dispose the internal resource This function can be called multiple times, only the first call will take effect.
Get the real pointer from offset values. Note that the returned value becomes obsolete if alloc is called on the stack.
The allocated offset.
Rest the call stack so that it can be reused again.
Auxiliary call stack for the FFI calls.
Lifecyle of a call stack.