rename std.heap.direct_allocator to std.heap.page_allocator

std.heap.direct_allocator is still available for now but it is marked
deprecated.
This commit is contained in:
Andrew Kelley
2019-11-25 17:25:06 -05:00
parent 35d65cceb8
commit cb38bd0a14
28 changed files with 110 additions and 104 deletions

View File

@@ -86,8 +86,8 @@ const puts_per_thread = 500;
const put_thread_count = 3;
test "std.atomic.stack" {
var plenty_of_memory = try std.heap.direct_allocator.alloc(u8, 300 * 1024);
defer std.heap.direct_allocator.free(plenty_of_memory);
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;