allocgate: stage 1 and 2 building

This commit is contained in:
Lee Cannon
2021-10-29 02:03:15 +01:00
parent 47bc13bc59
commit 75548b50ff
48 changed files with 227 additions and 200 deletions

View File

@@ -491,7 +491,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
\\pub fn main() !void {
\\ var allocator_buf: [10]u8 = undefined;
\\ var fixedBufferAllocator = std.mem.validationWrap(std.heap.FixedBufferAllocator.init(&allocator_buf));
\\ const allocator = &std.heap.loggingAllocator(&fixedBufferAllocator.allocator).allocator;
\\ const allocator = std.heap.loggingAllocator(fixedBufferAllocator.getAllocator()).getAllocator();
\\
\\ var a = try allocator.alloc(u8, 10);
\\ a = allocator.shrink(a, 5);