Skip to content

Commit

Permalink
Change AArch64-linux page size to 16k
Browse files Browse the repository at this point in the history
This only works specifically for Asahi Linux.

Fixes ziglang#11308
  • Loading branch information
Techcable committed Aug 14, 2022
1 parent d234237 commit 4540fd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/std/mem.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ pub const page_size = switch (builtin.cpu.arch) {
.wasm32, .wasm64 => 64 * 1024,
.aarch64 => switch (builtin.os.tag) {
.macos, .ios, .watchos, .tvos => 16 * 1024,
else => 4 * 1024,
// PATCH: Use 16k pages as default for AArch64 Linux
//
// Fixes Asahi Linux using 16k pages
.linux => 16 * 1024,
else => 8 * 1024,
},
.sparc64 => 8 * 1024,
else => 4 * 1024,
Expand Down

0 comments on commit 4540fd0

Please sign in to comment.