Add buffer skeleton

This commit is contained in:
Rerumu
2023-11-05 14:51:40 -05:00
parent b18365a7e4
commit 49d2456fca
3 changed files with 129 additions and 259 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ do
local WASM_PAGE_SIZE = 65536
local function is_valid_address(memory, addr, size)
return addr >= 0 and addr + size <= memory.min * WASM_PAGE_SIZE
return addr >= 0 and addr + size <= rt.allocator.size(memory) * WASM_PAGE_SIZE
end
local function load_checked(name, size)