memory.init
Copy data from a passive (data...)
object into memory. You can have any number of passive data blocks that contain
constant data. The data they contain can be copied into memory when required and to any location.
Syntax
memory.init $passiveData
Parameters
$passiveData
This points to a passive (data...)
object where the data is to be copied from.
Stack In
i32 |
The offset in memory to copy the data to. |
i32 |
The offset in the passive data to copy the data from. |
i32 |
The number of bytes to copy. |
Example
(memory 1)
(data $passiveData "Hello World")
(func $copyPassiveData
i32.const 1024
i32.const 0
i32.const 11
memory.init $passiveData
)