mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
This allocator has no purpose since it cannot truly fulfill the role of page allocation, and std.heap.wasm_allocator is better both in terms of performance and code size. This commit redefines `std.heap.page_allocator` to be less strict: "On operating systems that support memory mapping, this allocator makes a syscall directly for every allocation and free. Otherwise, it falls back to the preferred singleton for the target. Thread-safe." This now matches how it was actually being implemented, and matches its use sites - which are mainly as the backing allocator for `std.heap.ArenaAllocator`.