@@ -1872,7 +1872,7 @@ const IndexHeader = struct {
|
||||
const len = @as(usize, 1) << @intCast(math.Log2Int(usize), new_bit_index);
|
||||
const index_size = hash_map.capacityIndexSize(new_bit_index);
|
||||
const nbytes = @sizeOf(IndexHeader) + index_size * len;
|
||||
const bytes = try allocator.allocAdvanced(u8, @alignOf(IndexHeader), nbytes, .exact);
|
||||
const bytes = try allocator.alignedAlloc(u8, @alignOf(IndexHeader), nbytes);
|
||||
@memset(bytes.ptr + @sizeOf(IndexHeader), 0xff, bytes.len - @sizeOf(IndexHeader));
|
||||
const result = @ptrCast(*IndexHeader, bytes.ptr);
|
||||
result.* = .{
|
||||
|
||||
Reference in New Issue
Block a user