-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add std.heap.AutoAllocator #23432
base: master
Are you sure you want to change the base?
add std.heap.AutoAllocator #23432
Conversation
Provides a convenient abstraction for this relatively complex logic. Additionally, utilizes it in src/main.zig.
This will probably need an |
Test failures happening because |
If I can throw my two cents in here, could we bring the
Also, Basically, I'd love to have this code working as is again: var gpa_state: std.heap.GeneralPurposeAllocator(.{}) = .init;
const gpa = gpa_state.allocator();
defer if (gpa_state.deinit() == .leak) {
@panic("Memory leak has occurred!");
}; |
FWIW, the name that was suggested on Zulip was |
I think both can work. I changed it to |
@alexrp The CI timeout is due to the compiler now defaulting to the DebugAllocator for debug builds. Based on empirical testing, it seems that it is 70% slower for |
That would probably be best. |
Provides a convenient abstraction for this relatively complex logic.
Additionally, utilizes it in src/main.zig.