| ... | @@ -1098,13 +1098,13 @@ test "small allocations - free in same order" { | ... | @@ -1098,13 +1098,13 @@ test "small allocations - free in same order" { |
| 1098 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); | 1098 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); |
| 1099 | const allocator = gpa.allocator(); | 1099 | const allocator = gpa.allocator(); |
| 1100 | | 1100 | |
| 1101 | var list = std.array_list.Managed(*u64).init(std.testing.allocator); | 1101 | var list: std.ArrayList(*u64) = .empty; |
| 1102 | defer list.deinit(); | 1102 | defer list.deinit(std.testing.allocator); |
| 1103 | | 1103 | |
| 1104 | var i: usize = 0; | 1104 | var i: usize = 0; |
| 1105 | while (i < 513) : (i += 1) { | 1105 | while (i < 513) : (i += 1) { |
| 1106 | const ptr = try allocator.create(u64); | 1106 | const ptr = try allocator.create(u64); |
| 1107 | try list.append(ptr); | 1107 | try list.append(std.testing.allocator, ptr); |
| 1108 | } | 1108 | } |
| 1109 | | 1109 | |
| 1110 | for (list.items) |ptr| { | 1110 | for (list.items) |ptr| { |
| ... | @@ -1117,13 +1117,13 @@ test "small allocations - free in reverse order" { | ... | @@ -1117,13 +1117,13 @@ test "small allocations - free in reverse order" { |
| 1117 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); | 1117 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); |
| 1118 | const allocator = gpa.allocator(); | 1118 | const allocator = gpa.allocator(); |
| 1119 | | 1119 | |
| 1120 | var list = std.array_list.Managed(*u64).init(std.testing.allocator); | 1120 | var list: std.ArrayList(*u64) = .empty; |
| 1121 | defer list.deinit(); | 1121 | defer list.deinit(std.testing.allocator); |
| 1122 | | 1122 | |
| 1123 | var i: usize = 0; | 1123 | var i: usize = 0; |
| 1124 | while (i < 513) : (i += 1) { | 1124 | while (i < 513) : (i += 1) { |
| 1125 | const ptr = try allocator.create(u64); | 1125 | const ptr = try allocator.create(u64); |
| 1126 | try list.append(ptr); | 1126 | try list.append(std.testing.allocator, ptr); |
| 1127 | } | 1127 | } |
| 1128 | | 1128 | |
| 1129 | while (list.pop()) |ptr| { | 1129 | while (list.pop()) |ptr| { |
| ... | @@ -1281,9 +1281,9 @@ test "shrink large object to large object with larger alignment" { | ... | @@ -1281,9 +1281,9 @@ test "shrink large object to large object with larger alignment" { |
| 1281 | // This loop allocates until we find a page that is not aligned to the big | 1281 | // This loop allocates until we find a page that is not aligned to the big |
| 1282 | // alignment. Then we shrink the allocation after the loop, but increase the | 1282 | // alignment. Then we shrink the allocation after the loop, but increase the |
| 1283 | // alignment to the higher one, that we know will force it to realloc. | 1283 | // alignment to the higher one, that we know will force it to realloc. |
| 1284 | var stuff_to_free = std.array_list.Managed([]align(16) u8).init(debug_allocator); | 1284 | var stuff_to_free: std.ArrayList([]align(16) u8) = .empty; |
| 1285 | while (mem.isAligned(@intFromPtr(slice.ptr), big_alignment)) { | 1285 | while (mem.isAligned(@intFromPtr(slice.ptr), big_alignment)) { |
| 1286 | try stuff_to_free.append(slice); | 1286 | try stuff_to_free.append(debug_allocator, slice); |
| 1287 | slice = try allocator.alignedAlloc(u8, .@"16", alloc_size); | 1287 | slice = try allocator.alignedAlloc(u8, .@"16", alloc_size); |
| 1288 | } | 1288 | } |
| 1289 | while (stuff_to_free.pop()) |item| { | 1289 | while (stuff_to_free.pop()) |item| { |
| ... | @@ -1344,9 +1344,9 @@ test "realloc large object to larger alignment" { | ... | @@ -1344,9 +1344,9 @@ test "realloc large object to larger alignment" { |
| 1344 | | 1344 | |
| 1345 | const big_alignment: usize = default_page_size * 2; | 1345 | const big_alignment: usize = default_page_size * 2; |
| 1346 | // This loop allocates until we find a page that is not aligned to the big alignment. | 1346 | // This loop allocates until we find a page that is not aligned to the big alignment. |
| 1347 | var stuff_to_free = std.array_list.Managed([]align(16) u8).init(debug_allocator); | 1347 | var stuff_to_free: std.ArrayList([]align(16) u8) = .empty; |
| 1348 | while (mem.isAligned(@intFromPtr(slice.ptr), big_alignment)) { | 1348 | while (mem.isAligned(@intFromPtr(slice.ptr), big_alignment)) { |
| 1349 | try stuff_to_free.append(slice); | 1349 | try stuff_to_free.append(debug_allocator, slice); |
| 1350 | slice = try allocator.alignedAlloc(u8, .@"16", default_page_size * 2 + 50); | 1350 | slice = try allocator.alignedAlloc(u8, .@"16", default_page_size * 2 + 50); |
| 1351 | } | 1351 | } |
| 1352 | while (stuff_to_free.pop()) |item| { | 1352 | while (stuff_to_free.pop()) |item| { |