aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug/Dwarf.zig
diff options
context:
space:
mode:
authorArchbirdplus <archbirdplus@gmail.com>2024-10-20 14:55:57 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-02-06 14:23:23 -0800
commit439667be0476f5bf60f3efbb82a3c4d5aae96ee4 (patch)
tree982fdb5d9260c1c30dee76f89319848e0371b4e2 /lib/std/debug/Dwarf.zig
parentb0ed602d5d9358128471588f00a073f2545809fa (diff)
downloadzig-439667be0476f5bf60f3efbb82a3c4d5aae96ee4.tar.gz
zig-439667be0476f5bf60f3efbb82a3c4d5aae96ee4.zip
runtime page size detection
heap.zig: define new default page sizes heap.zig: add min/max_page_size and their options lib/std/c: add miscellaneous declarations heap.zig: add pageSize() and its options switch to new page sizes, especially in GPA/stdlib mem.zig: remove page_size
Diffstat (limited to 'lib/std/debug/Dwarf.zig')
-rw-r--r--lib/std/debug/Dwarf.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/debug/Dwarf.zig b/lib/std/debug/Dwarf.zig
index 3469deaae9..d4cd674898 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.mem.page_size) const u8,
- external_mapped_memory: ?[]align(std.mem.page_size) const u8,
+ mapped_memory: []align(std.heap.min_page_size) const u8,
+ external_mapped_memory: ?[]align(std.heap.min_page_size) 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.mem.page_size) const u8,
+ mapped_mem: []align(std.heap.min_page_size) const u8,
build_id: ?[]const u8,
expected_crc: ?u32,
parent_sections: *Dwarf.SectionArray,
- parent_mapped_mem: ?[]align(std.mem.page_size) const u8,
+ parent_mapped_mem: ?[]align(std.heap.min_page_size) 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.mem.page_size) const u8,
+ parent_mapped_mem: ?[]align(std.heap.min_page_size) 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(),