aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug/SelfInfo.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/SelfInfo.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/SelfInfo.zig')
-rw-r--r--lib/std/debug/SelfInfo.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/debug/SelfInfo.zig b/lib/std/debug/SelfInfo.zig
index a2cea70d37..ee676ecf3e 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(mem.page_size) const u8,
+ mapped_memory: []align(std.heap.min_page_size) 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(mem.page_size) const u8,
+ parent_mapped_mem: ?[]align(std.heap.min_page_size) 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(mem.page_size) const u8 {
+fn mapWholeFile(file: File) ![]align(std.heap.min_page_size) const u8 {
nosuspend {
defer file.close();