Skip to content

Instantly share code, notes, and snippets.

@sfpgmr sfpgmr/.wat
Created Aug 14, 2018

Embed
What would you like to do?
メモリの検証コードを書く
(module
(export "test" $test)
(memory $memory 1)
(export "memory" (memory $memory))
(func $test
(drop(grow_memory (i32.const 3)));;3ページ分確保
(i32.store
(i32.const 0)
(i32.mul (current_memory) (i32.const 65536));;現在のページ数にサイズ(65536bytes)をかけた数をオフセット0に格納
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.