| ... | @@ -42,10 +42,8 @@ pub var next_mmap_addr_hint: ?[*]align(page_size_min) u8 = null; | ... | @@ -42,10 +42,8 @@ pub var next_mmap_addr_hint: ?[*]align(page_size_min) u8 = null; |
| 42 | /// | 42 | /// |
| 43 | /// On many systems, the actual page size can only be determined at runtime | 43 | /// On many systems, the actual page size can only be determined at runtime |
| 44 | /// with `pageSize`. | 44 | /// with `pageSize`. |
| 45 | pub const page_size_min: usize = std.options.page_size_min orelse (page_size_min_default orelse if (builtin.os.tag == .freestanding or builtin.os.tag == .other) | 45 | pub const page_size_min: usize = std.options.page_size_min orelse page_size_min_default orelse |
| 46 | @compileError("freestanding/other page_size_min must provided with std.options.page_size_min") | 46 | @compileError(@tagName(builtin.cpu.arch) ++ "-" ++ @tagName(builtin.os.tag) ++ " has unknown page_size_min; populate std.options.page_size_min"); |
| 47 | else | | |
| 48 | @compileError(@tagName(builtin.cpu.arch) ++ "-" ++ @tagName(builtin.os.tag) ++ " has unknown page_size_min; populate std.options.page_size_min")); | | |
| 49 | | 47 | |
| 50 | /// comptime-known maximum page size of the target. | 48 | /// comptime-known maximum page size of the target. |
| 51 | /// | 49 | /// |
| ... | @@ -831,8 +829,10 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) { | ... | @@ -831,8 +829,10 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) { |
| 831 | .xtensa => 4 << 10, | 829 | .xtensa => 4 << 10, |
| 832 | else => null, | 830 | else => null, |
| 833 | }, | 831 | }, |
| 834 | .freestanding => switch (builtin.cpu.arch) { | 832 | .freestanding, .other => switch (builtin.cpu.arch) { |
| 835 | .wasm32, .wasm64 => 64 << 10, | 833 | .wasm32, .wasm64 => 64 << 10, |
| | 834 | .x86, .x86_64 => 4 << 10, |
| | 835 | .aarch64, .aarch64_be => 4 << 10, |
| 836 | else => null, | 836 | else => null, |
| 837 | }, | 837 | }, |
| 838 | else => null, | 838 | else => null, |