diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-01-29 14:16:25 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-02-06 14:23:23 -0800 |
| commit | 284de7d957037c8a7032bd6e2a95bd5f55b73666 (patch) | |
| tree | 852d4ef1e8fd8c052485fd38d0dcdfafd28594bb /lib/std/debug/MemoryAccessor.zig | |
| parent | 439667be0476f5bf60f3efbb82a3c4d5aae96ee4 (diff) | |
| download | zig-284de7d957037c8a7032bd6e2a95bd5f55b73666.tar.gz zig-284de7d957037c8a7032bd6e2a95bd5f55b73666.zip | |
adjust runtime page size APIs
* fix merge conflicts
* rename the declarations
* reword documentation
* extract FixedBufferAllocator to separate file
* take advantage of locals
* remove the assertion about max alignment in Allocator API, leaving it
Allocator implementation defined
* fix non-inline function call in start logic
The GeneralPurposeAllocator implementation is totally broken because it
uses global state but I didn't address that in this commit.
Diffstat (limited to 'lib/std/debug/MemoryAccessor.zig')
| -rw-r--r-- | lib/std/debug/MemoryAccessor.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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; |
