Skip to content

Commit

Permalink
Removed redundant unused functions from PageAllocator.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTheGleaming committed Dec 10, 2024
1 parent d8be3fa commit 1f7f7de
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/std/heap/PageAllocator.zig
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ pub const vtable = Allocator.VTable{
/// Whether `posix.mremap` may be used
const use_mremap = @hasDecl(posix.system, "REMAP") and posix.system.REMAP != void;

fn mmapAlloc(bytes: usize, hint: ?[*]align(mem.page_size) u8) ![]align(mem.page_size) u8 {
return posix.mmap(
hint,
bytes,
posix.PROT.READ | posix.PROT.WRITE,
.{ .TYPE = .PRIVATE, .ANONYMOUS = true },
-1,
0,
);
}

fn mapUnget(memory: []align(mem.page_size) u8) void {
std.posix.munmap(memory);
}

fn alloc(_: *anyopaque, n: usize, log2_align: u8, ra: usize) ?[*]u8 {
_ = ra;
_ = log2_align;
Expand Down

0 comments on commit 1f7f7de

Please sign in to comment.