diff options
Diffstat (limited to 'lib/std/debug')
| -rw-r--r-- | lib/std/debug/Dwarf.zig | 10 | ||||
| -rw-r--r-- | lib/std/debug/MemoryAccessor.zig | 4 | ||||
| -rw-r--r-- | lib/std/debug/SelfInfo.zig | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/std/debug/Dwarf.zig b/lib/std/debug/Dwarf.zig index d4cd674898..b72ddcac47 100644 --- a/lib/std/debug/Dwarf.zig +++ b/lib/std/debug/Dwarf.zig @@ -2120,8 +2120,8 @@ fn pcRelBase(field_ptr: usize, pc_rel_offset: i64) !usize { pub const ElfModule = struct { base_address: usize, dwarf: Dwarf, - mapped_memory: []align(std.heap.min_page_size) const u8, - external_mapped_memory: ?[]align(std.heap.min_page_size) const u8, + mapped_memory: []align(std.heap.page_size_min) const u8, + external_mapped_memory: ?[]align(std.heap.page_size_min) const u8, pub fn deinit(self: *@This(), allocator: Allocator) void { self.dwarf.deinit(allocator); @@ -2167,11 +2167,11 @@ pub const ElfModule = struct { /// sections from an external file. pub fn load( gpa: Allocator, - mapped_mem: []align(std.heap.min_page_size) const u8, + mapped_mem: []align(std.heap.page_size_min) const u8, build_id: ?[]const u8, expected_crc: ?u32, parent_sections: *Dwarf.SectionArray, - parent_mapped_mem: ?[]align(std.heap.min_page_size) const u8, + parent_mapped_mem: ?[]align(std.heap.page_size_min) const u8, elf_filename: ?[]const u8, ) LoadError!Dwarf.ElfModule { if (expected_crc) |crc| if (crc != std.hash.crc.Crc32.hash(mapped_mem)) return error.InvalidDebugInfo; @@ -2423,7 +2423,7 @@ pub const ElfModule = struct { build_id: ?[]const u8, expected_crc: ?u32, parent_sections: *Dwarf.SectionArray, - parent_mapped_mem: ?[]align(std.heap.min_page_size) const u8, + parent_mapped_mem: ?[]align(std.heap.page_size_min) const u8, ) LoadError!Dwarf.ElfModule { const elf_file = elf_file_path.root_dir.handle.openFile(elf_file_path.sub_path, .{}) catch |err| switch (err) { error.FileNotFound => return missing(), diff --git a/lib/std/debug/MemoryAccessor.zig b/lib/std/debug/MemoryAccessor.zig index 8c9c93b52e..7857656554 100644 --- a/lib/std/debug/MemoryAccessor.zig +++ b/lib/std/debug/MemoryAccessor.zig @@ -7,7 +7,7 @@ const native_os = builtin.os.tag; const std = @import("../std.zig"); const posix = std.posix; const File = std.fs.File; -const min_page_size = std.heap.min_page_size; +const page_size_min = std.heap.page_size_min; const MemoryAccessor = @This(); @@ -96,7 +96,7 @@ pub fn isValidMemory(address: usize) bool { const page_size = std.heap.pageSize(); const aligned_address = address & ~(page_size - 1); if (aligned_address == 0) return false; - const aligned_memory = @as([*]align(min_page_size) u8, @ptrFromInt(aligned_address))[0..page_size]; + const aligned_memory = @as([*]align(page_size_min) u8, @ptrFromInt(aligned_address))[0..page_size]; if (native_os == .windows) { const windows = std.os.windows; diff --git a/lib/std/debug/SelfInfo.zig b/lib/std/debug/SelfInfo.zig index ee676ecf3e..b51a8f18d2 100644 --- a/lib/std/debug/SelfInfo.zig +++ b/lib/std/debug/SelfInfo.zig @@ -504,7 +504,7 @@ pub const Module = switch (native_os) { .macos, .ios, .watchos, .tvos, .visionos => struct { base_address: usize, vmaddr_slide: usize, - mapped_memory: []align(std.heap.min_page_size) const u8, + mapped_memory: []align(std.heap.page_size_min) const u8, symbols: []const MachoSymbol, strings: [:0]const u8, ofiles: OFileTable, @@ -1046,7 +1046,7 @@ pub fn readElfDebugInfo( build_id: ?[]const u8, expected_crc: ?u32, parent_sections: *Dwarf.SectionArray, - parent_mapped_mem: ?[]align(std.heap.min_page_size) const u8, + parent_mapped_mem: ?[]align(std.heap.page_size_min) const u8, ) !Dwarf.ElfModule { nosuspend { const elf_file = (if (elf_filename) |filename| blk: { @@ -1088,7 +1088,7 @@ const MachoSymbol = struct { /// Takes ownership of file, even on error. /// TODO it's weird to take ownership even on error, rework this code. -fn mapWholeFile(file: File) ![]align(std.heap.min_page_size) const u8 { +fn mapWholeFile(file: File) ![]align(std.heap.page_size_min) const u8 { nosuspend { defer file.close(); |
