authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-15 21:20:41-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-15 21:20:41-04:00
log0a280b6062c0b0a3c7a460499c72be40acfcac46
tree02c135b2c95642bd1987e1977b41676919f39ab2
parent6692cbbe18ad108affccfb9cb85d53e2583408ec
signaturelock-open Commit is signed but in an unrecognized format.

update std.os.page_size for WebAssembly


1 files changed, 5 insertions(+), 1 deletions(-)

std/os.zig+5-1
...@@ -53,7 +53,11 @@ pub const path = @import("os/path.zig");...@@ -53,7 +53,11 @@ pub const path = @import("os/path.zig");
53pub const File = @import("os/file.zig").File;53pub const File = @import("os/file.zig").File;
54pub const time = @import("os/time.zig");54pub const time = @import("os/time.zig");
5555
56pub const page_size = 4 * 1024;56pub const page_size = switch (builtin.arch) {
57 .wasm32, .wasm64 => 64 * 1024,
58 else => 4 * 1024,
59};
60
57pub const MAX_PATH_BYTES = switch (builtin.os) {61pub const MAX_PATH_BYTES = switch (builtin.os) {
58 Os.linux, Os.macosx, Os.ios, Os.freebsd, Os.netbsd => posix.PATH_MAX,62 Os.linux, Os.macosx, Os.ios, Os.freebsd, Os.netbsd => posix.PATH_MAX,
59 // Each UTF-16LE character may be expanded to 3 UTF-8 bytes.63 // Each UTF-16LE character may be expanded to 3 UTF-8 bytes.