diff options
author | 2023-07-18 01:20:20 -0700 | |
---|---|---|
committer | 2023-07-18 01:20:20 -0700 | |
commit | 661355546a4658ea927bfd70698577c1db301243 (patch) | |
tree | 2b8d33ea64ab6f23c5f1729d106076cbadd44c89 /src/memory_allocator.zig | |
parent | 71f1aa1802360d74d823b1a1544454b199b27898 (diff) | |
download | bun-661355546a4658ea927bfd70698577c1db301243.tar.gz bun-661355546a4658ea927bfd70698577c1db301243.tar.zst bun-661355546a4658ea927bfd70698577c1db301243.zip |
zig upgrade (#3667)
* upgrade
* more fixes
* Bump Zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/memory_allocator.zig')
-rw-r--r-- | src/memory_allocator.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/memory_allocator.zig b/src/memory_allocator.zig index 391446f5e..dbcc492e9 100644 --- a/src/memory_allocator.zig +++ b/src/memory_allocator.zig @@ -71,7 +71,7 @@ const CAllocator = struct { } } - return @ptrCast(?[*]u8, ptr); + return @as(?[*]u8, @ptrCast(ptr)); } fn alignedAllocSize(ptr: [*]u8) usize { @@ -83,7 +83,7 @@ const CAllocator = struct { return alignedAlloc(len, log2_align); } - const alignment = @as(usize, 1) << @intCast(Allocator.Log2Align, log2_align); + const alignment = @as(usize, 1) << @as(Allocator.Log2Align, @intCast(log2_align)); return alignedAlloc(len, alignment); } @@ -132,7 +132,7 @@ const ZAllocator = struct { } } - return @ptrCast(?[*]u8, ptr); + return @as(?[*]u8, @ptrCast(ptr)); } fn alignedAllocSize(ptr: [*]u8) usize { @@ -211,7 +211,7 @@ const HugeAllocator = struct { _: u29, _: usize, ) void { - std.os.munmap(@alignCast(std.meta.alignment([]align(std.mem.page_size) u8), buf)); + std.os.munmap(@alignCast(buf)); } }; |