diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-02-07 06:21:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-07 06:21:51 -0800 |
| commit | 6a6e72fff820fb641aa1b00700f6835430dae72e (patch) | |
| tree | ea70863e08ba9167cfe954287691cce98716d918 /lib/std/debug/Dwarf.zig | |
| parent | 8ad0732954df80f0f9a0248525c2bded7e82ba27 (diff) | |
| parent | b8f5cfed457726a77082b7ffe6672b6066c0a66e (diff) | |
| download | zig-6a6e72fff820fb641aa1b00700f6835430dae72e.tar.gz zig-6a6e72fff820fb641aa1b00700f6835430dae72e.zip | |
Merge pull request #20511 from archbirdplus
runtime page size detection
rework GeneralPurposeAllocator to reduce active mapping count
Allocator VTable API update
Diffstat (limited to 'lib/std/debug/Dwarf.zig')
| -rw-r--r-- | lib/std/debug/Dwarf.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/debug/Dwarf.zig b/lib/std/debug/Dwarf.zig index 3469deaae9..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.mem.page_size) const u8, - external_mapped_memory: ?[]align(std.mem.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.mem.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.mem.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.mem.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(), |
