| ... | @@ -1098,12 +1098,12 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co | ... | @@ -1098,12 +1098,12 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co |
| 1098 | // as we don't read into a new page. This should be the case for most architectures | 1098 | // as we don't read into a new page. This should be the case for most architectures |
| 1099 | // which use paged memory, however should be confirmed before adding a new arch below. | 1099 | // which use paged memory, however should be confirmed before adding a new arch below. |
| 1100 | .aarch64, .x86, .x86_64 => if (std.simd.suggestVectorLength(T)) |block_len| { | 1100 | .aarch64, .x86, .x86_64 => if (std.simd.suggestVectorLength(T)) |block_len| { |
| 1101 | const page_size = std.heap.pageSize(); | 1101 | const page_size = std.heap.page_size_min; |
| 1102 | const block_size = @sizeOf(T) * block_len; | 1102 | const block_size = @sizeOf(T) * block_len; |
| 1103 | const Block = @Vector(block_len, T); | 1103 | const Block = @Vector(block_len, T); |
| 1104 | const mask: Block = @splat(sentinel); | 1104 | const mask: Block = @splat(sentinel); |
| 1105 | | 1105 | |
| 1106 | comptime assert(std.heap.page_size_max % @sizeOf(Block) == 0); | 1106 | comptime assert(std.heap.page_size_min % @sizeOf(Block) == 0); |
| 1107 | assert(page_size % @sizeOf(Block) == 0); | 1107 | assert(page_size % @sizeOf(Block) == 0); |
| 1108 | | 1108 | |
| 1109 | // First block may be unaligned | 1109 | // First block may be unaligned |
| ... | @@ -1153,7 +1153,7 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co | ... | @@ -1153,7 +1153,7 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co |
| 1153 | test "indexOfSentinel vector paths" { | 1153 | test "indexOfSentinel vector paths" { |
| 1154 | const Types = [_]type{ u8, u16, u32, u64 }; | 1154 | const Types = [_]type{ u8, u16, u32, u64 }; |
| 1155 | const allocator = std.testing.allocator; | 1155 | const allocator = std.testing.allocator; |
| 1156 | const page_size = std.heap.pageSize(); | 1156 | const page_size = std.heap.page_size_min; |
| 1157 | | 1157 | |
| 1158 | inline for (Types) |T| { | 1158 | inline for (Types) |T| { |
| 1159 | const block_len = std.simd.suggestVectorLength(T) orelse continue; | 1159 | const block_len = std.simd.suggestVectorLength(T) orelse continue; |