diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-04-15 21:20:41 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-04-15 21:20:41 -0400 |
| commit | 0a280b6062c0b0a3c7a460499c72be40acfcac46 (patch) | |
| tree | 02c135b2c95642bd1987e1977b41676919f39ab2 /std | |
| parent | 6692cbbe18ad108affccfb9cb85d53e2583408ec (diff) | |
| download | zig-0a280b6062c0b0a3c7a460499c72be40acfcac46.tar.gz zig-0a280b6062c0b0a3c7a460499c72be40acfcac46.zip | |
update std.os.page_size for WebAssembly
Diffstat (limited to 'std')
| -rw-r--r-- | std/os.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/std/os.zig b/std/os.zig index c1d5aa4096..ae2b04b759 100644 --- a/std/os.zig +++ b/std/os.zig @@ -53,7 +53,11 @@ pub const path = @import("os/path.zig"); pub const File = @import("os/file.zig").File; pub const time = @import("os/time.zig"); -pub const page_size = 4 * 1024; +pub const page_size = switch (builtin.arch) { + .wasm32, .wasm64 => 64 * 1024, + else => 4 * 1024, +}; + pub const MAX_PATH_BYTES = switch (builtin.os) { Os.linux, Os.macosx, Os.ios, Os.freebsd, Os.netbsd => posix.PATH_MAX, // Each UTF-16LE character may be expanded to 3 UTF-8 bytes. |
