Use the page allocator as our base allocator for now.
This commit is contained in:
parent
cea1222b79
commit
5c602745fd
@ -387,11 +387,10 @@ const leak_count_alloc: ?*std.testing.LeakCountAllocator = if (use_leak_count_al
|
|||||||
|
|
||||||
pub fn main() anyerror!void {
|
pub fn main() anyerror!void {
|
||||||
|
|
||||||
// Init memory
|
// TODO: Use a better purpose general allocator once std has one.
|
||||||
|
// Probably after the generic composable allocators PR?
|
||||||
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
// This is not too bad for now since most allocations happen in local areans.
|
||||||
defer arena.deinit();
|
allocator = std.heap.page_allocator;
|
||||||
allocator = &arena.allocator;
|
|
||||||
|
|
||||||
if (use_leak_count_alloc) {
|
if (use_leak_count_alloc) {
|
||||||
// Initialize the leak counting allocator.
|
// Initialize the leak counting allocator.
|
||||||
|
Loading…
Reference in New Issue
Block a user