| ... | ... | @@ -13,7 +13,8 @@ const meta = std.meta; |
| 13 | 13 | const trait = meta.trait; |
| 14 | 14 | const testing = std.testing; |
| 15 | 15 | |
| 16 | | /// https://github.com/ziglang/zig/issues/2564 |
| 16 | /// Compile time known minimum page size. |
| 17 | /// https://github.com/ziglang/zig/issues/4082 |
| 17 | 18 | pub const page_size = switch (builtin.arch) { |
| 18 | 19 | .wasm32, .wasm64 => 64 * 1024, |
| 19 | 20 | .aarch64 => switch (builtin.os.tag) { |
| ... | ... | @@ -139,7 +140,7 @@ test "mem.Allocator basics" { |
| 139 | 140 | |
| 140 | 141 | /// Copy all of source into dest at position 0. |
| 141 | 142 | /// dest.len must be >= source.len. |
| 142 | | /// dest.ptr must be <= src.ptr. |
| 143 | /// If the slices overlap, dest.ptr must be <= src.ptr. |
| 143 | 144 | pub fn copy(comptime T: type, dest: []T, source: []const T) void { |
| 144 | 145 | // TODO instead of manually doing this check for the whole array |
| 145 | 146 | // and turning off runtime safety, the compiler should detect loops like |
| ... | ... | @@ -152,7 +153,7 @@ pub fn copy(comptime T: type, dest: []T, source: []const T) void { |
| 152 | 153 | |
| 153 | 154 | /// Copy all of source into dest at position 0. |
| 154 | 155 | /// dest.len must be >= source.len. |
| 155 | | /// dest.ptr must be >= src.ptr. |
| 156 | /// If the slices overlap, dest.ptr must be >= src.ptr. |
| 156 | 157 | pub fn copyBackwards(comptime T: type, dest: []T, source: []const T) void { |
| 157 | 158 | // TODO instead of manually doing this check for the whole array |
| 158 | 159 | // and turning off runtime safety, the compiler should detect loops like |