diff options
Diffstat (limited to 'lib/std/atomic/stack.zig')
| -rw-r--r-- | lib/std/atomic/stack.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/atomic/stack.zig b/lib/std/atomic/stack.zig index 35f6914252..a6396bb22b 100644 --- a/lib/std/atomic/stack.zig +++ b/lib/std/atomic/stack.zig @@ -69,7 +69,7 @@ pub fn Stack(comptime T: type) type { } const Context = struct { - allocator: *std.mem.Allocator, + allocator: std.mem.Allocator, stack: *Stack(i32), put_sum: isize, get_sum: isize, @@ -88,8 +88,8 @@ test "std.atomic.stack" { var plenty_of_memory = try std.heap.page_allocator.alloc(u8, 300 * 1024); defer std.heap.page_allocator.free(plenty_of_memory); - var fixed_buffer_allocator = std.heap.ThreadSafeFixedBufferAllocator.init(plenty_of_memory); - var a = &fixed_buffer_allocator.allocator; + var fixed_buffer_allocator = std.heap.FixedBufferAllocator.init(plenty_of_memory); + var a = fixed_buffer_allocator.threadSafeAllocator(); var stack = Stack(i32).init(); var context = Context{ |
