Browse Source

Use std.wasm.page_size instead of defining a custom page_size

Daniel Sanchez 1 year ago
parent
commit
ac3f94ce0b
1 changed files with 1 additions and 2 deletions
  1. 1 2
      build.zig

+ 1 - 2
build.zig

@@ -1,9 +1,8 @@
 const std = @import("std");
 
-const page_size = 65536; // in bytes
 // Initial and max memory must correspond to the memory size defined in script.js.
 // TODO: This used to be 10 pages. Find out why this needs 17 pages.
-const wasm_initial_memory = 17 * page_size;
+const wasm_initial_memory = 17 * std.wasm.page_size;
 const wasm_max_memory = wasm_initial_memory;
 
 pub fn build(b: *std.build.Builder) void {