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
This commit is contained in:
Archbirdplus
2024-10-20 14:55:57 -07:00
committed by Andrew Kelley
parent b0ed602d5d
commit 439667be04
29 changed files with 614 additions and 176 deletions

View File

@@ -480,7 +480,7 @@ pub const MemoryMappedList = struct {
/// of this ArrayList in accordance with the respective documentation. In
/// all cases, "invalidated" means that the memory has been passed to this
/// allocator's resize or free function.
items: []align(std.mem.page_size) volatile u8,
items: []align(std.heap.min_page_size) volatile u8,
/// How many bytes this list can hold without allocating additional memory.
capacity: usize,