You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is on Windows 10 using zig-windows-x86_64-0.6.0+12a7dedb1.zip.
No problems before recent Allocator changes.
conststd=@import("std");
pubfnmain() anyerror!void {
varheap_allocator=std.heap.HeapAllocator.init();
deferheap_allocator.deinit();
constallocator=&heap_allocator.allocator;
vararena=std.heap.ArenaAllocator.init(allocator);
deferarena.deinit();
constarena_allocator=&arena.allocator;
// Allocating an u8 instead of u16 for foo would avoid the crash on allocating bar.constfoo=tryarena_allocator.create(u16);
// Allocating bar before foo would crash on "defer arena.deinit();" instead.constbar=tryallocator.create(u8);
deferallocator.destroy(bar);
}
The text was updated successfully, but these errors were encountered:
HeapAllocator stores the pointer returned by HeapAlloc right after the
data block and, after the recent allocator refactoring, the space for
this pointer was not taken into account in the calculation of the final
block size.
Fixesziglang#5830
HeapAllocator stores the pointer returned by HeapAlloc right after the
data block and, after the recent allocator refactoring, the space for
this pointer was not taken into account in the calculation of the final
block size.
Fixes#5830
This is on Windows 10 using zig-windows-x86_64-0.6.0+12a7dedb1.zip.
No problems before recent Allocator changes.
The text was updated successfully, but these errors were encountered: