diff --git a/lib/std/heap.zig b/lib/std/heap.zig index 12a7f0a52eb131492e9dc5be72b42acec263373b..7e56bcfb5c6b1551e34e29e39904eba2e1643db8 100644 --- a/lib/std/heap.zig +++ b/lib/std/heap.zig @@ -544,13 +544,13 @@ pub fn testAllocatorAlignedShrink(base_allocator: mem.Allocator) !void { var slice = try allocator.alignedAlloc(u8, .@"16", alloc_size); defer allocator.free(slice); - var stuff_to_free = std.array_list.Managed([]align(16) u8).init(debug_allocator); + var stuff_to_free: std.ArrayList([]align(16) u8) = .empty; // On Windows, VirtualAlloc returns addresses aligned to a 64K boundary, // which is 16 pages, hence the 32. This test may require to increase // the size of the allocations feeding the `allocator` parameter if they // fail, because of this high over-alignment we want to have. while (@intFromPtr(slice.ptr) == mem.alignForward(usize, @intFromPtr(slice.ptr), pageSize() * 32)) { - try stuff_to_free.append(slice); + try stuff_to_free.append(debug_allocator, slice); slice = try allocator.alignedAlloc(u8, .@"16", alloc_size); } while (stuff_to_free.pop()) |item| {