mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 13:51:47 +00:00
chore: upgrade zig to 0.12.0-dev.1828+225fe6ddb (#7671)
* chore: upgrade zig to 0.12.0-dev.1828+225fe6ddb * open as iterable * fix building identifier cache * fix windows build * fix linux build * fix linux build
This commit is contained in:
@@ -59,7 +59,7 @@ const CAllocator = struct {
|
||||
fn alignedAlloc(len: usize, alignment: usize) ?[*]u8 {
|
||||
if (comptime FeatureFlags.log_allocations) std.debug.print("Malloc: {d}\n", .{len});
|
||||
|
||||
var ptr: ?*anyopaque = if (mimalloc.canUseAlignedAlloc(len, alignment))
|
||||
const ptr: ?*anyopaque = if (mimalloc.canUseAlignedAlloc(len, alignment))
|
||||
mimalloc.mi_malloc_aligned(len, alignment)
|
||||
else
|
||||
mimalloc.mi_malloc(len);
|
||||
@@ -120,7 +120,7 @@ const ZAllocator = struct {
|
||||
fn alignedAlloc(len: usize, alignment: usize) ?[*]u8 {
|
||||
if (comptime FeatureFlags.log_allocations) std.debug.print("Malloc: {d}\n", .{len});
|
||||
|
||||
var ptr = if (mimalloc.canUseAlignedAlloc(len, alignment))
|
||||
const ptr = if (mimalloc.canUseAlignedAlloc(len, alignment))
|
||||
mimalloc.mi_zalloc_aligned(len, alignment)
|
||||
else
|
||||
mimalloc.mi_zalloc(len);
|
||||
@@ -180,7 +180,7 @@ const HugeAllocator = struct {
|
||||
assert(len > 0);
|
||||
assert(std.math.isPowerOfTwo(alignment));
|
||||
|
||||
var slice = std.os.mmap(
|
||||
const slice = std.os.mmap(
|
||||
null,
|
||||
len,
|
||||
std.os.PROT.READ | std.os.PROT.WRITE,
|
||||
|
||||
Reference in New Issue
Block a user