Skip to content

Commit

Permalink
mem.zig: remove page_size
Browse files Browse the repository at this point in the history
  • Loading branch information
archbirdplus authored and alexrp committed Nov 3, 2024
1 parent 9595d60 commit f539f9f
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions lib/std/mem.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@ const testing = std.testing;
const Endian = std.builtin.Endian;
const native_endian = builtin.cpu.arch.endian();

/// Compile time known minimum page size.
/// https://github.com/ziglang/zig/issues/4082
pub const page_size = switch (builtin.cpu.arch) {
.wasm32, .wasm64 => 64 * 1024,
.aarch64 => switch (builtin.os.tag) {
.macos, .ios, .watchos, .tvos, .visionos => 16 * 1024,
else => 4 * 1024,
},
.sparc64 => 8 * 1024,
.loongarch32, .loongarch64 => switch (builtin.os.tag) {
// Linux default KConfig value is 16KiB
.linux => 16 * 1024,
// FIXME:
// There is no other OS supported yet. Use the same value
// as Linux for now.
else => 16 * 1024,
},
else => 4 * 1024,
};

/// The standard library currently thoroughly depends on byte size
/// being 8 bits. (see the use of u8 throughout allocation code as
/// the "byte" type.) Code which depends on this can reference this
Expand Down

0 comments on commit f539f9f

Please sign in to comment.