commit 7eda0b572489ccd3867d0d98bf85ffa7b9d4f882 (tree)
parent 3c5502ed8def9f604bd4338c6276c1f858daecfe
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Mon, 20 Oct 2025 03:45:38 +0200
std.heap: define page size for alpha, hppa, microblaze, sh on Linux
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/std/heap.zig b/lib/std/heap.zig
@@ -824,18 +824,22 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) {
.emscripten => 64 << 10,
.linux => switch (builtin.cpu.arch) {
// Linux/arch/*/Kconfig
+ .alpha => 8 << 10,
.arc, .arceb => 4 << 10,
.thumb, .thumbeb, .arm, .armeb => 4 << 10,
.aarch64, .aarch64_be => 4 << 10,
.csky => 4 << 10,
.hexagon => 4 << 10,
+ .hppa => 4 << 10,
.loongarch32, .loongarch64 => 4 << 10,
.m68k => 4 << 10,
+ .microblaze, .microblazeel => 4 << 10,
.mips, .mipsel, .mips64, .mips64el => 4 << 10,
.or1k => 8 << 10,
.powerpc, .powerpc64, .powerpc64le, .powerpcle => 4 << 10,
.riscv32, .riscv64 => 4 << 10,
.s390x => 4 << 10,
+ .sh, .sheb => 4 << 10,
.sparc => 4 << 10,
.sparc64 => 8 << 10,
.x86, .x86_64 => 4 << 10,
@@ -972,18 +976,22 @@ const page_size_max_default: ?usize = switch (builtin.os.tag) {
.emscripten => 64 << 10,
.linux => switch (builtin.cpu.arch) {
// Linux/arch/*/Kconfig
+ .alpha => 8 << 10,
.arc, .arceb => 16 << 10,
.thumb, .thumbeb, .arm, .armeb => 4 << 10,
.aarch64, .aarch64_be => 64 << 10,
.csky => 4 << 10,
.hexagon => 256 << 10,
+ .hppa => 64 << 10,
.loongarch32, .loongarch64 => 64 << 10,
.m68k => 8 << 10,
+ .microblaze, .microblazeel => 4 << 10,
.mips, .mipsel, .mips64, .mips64el => 64 << 10,
.or1k => 8 << 10,
.powerpc, .powerpc64, .powerpc64le, .powerpcle => 256 << 10,
.riscv32, .riscv64 => 4 << 10,
.s390x => 4 << 10,
+ .sh, .sheb => 64 << 10,
.sparc => 4 << 10,
.sparc64 => 8 << 10,
.x86, .x86_64 => 4 << 10,