mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
update std.os.page_size for WebAssembly
This commit is contained in:
parent
6692cbbe18
commit
0a280b6062
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user