zig icon indicating copy to clipboard operation
zig copied to clipboard

Allocation fails for buffers larger than 2^29 bytes

Open Snektron opened this issue 5 years ago • 1 comments

When allocating a buffer with more than 2^29 bytes, the integer cast on this line overflows: https://github.com/ziglang/zig/blob/8d8d568854d33be7bcc2bc9874029d1082914af7/lib/std/mem/Allocator.zig#L286

Snektron avatar Aug 17 '20 00:08 Snektron

Seems to have been resolved, there are no @intCasts in std/mem/Allocator anymore and I can allocate 6GB without any issues.

tau-dev avatar Jul 15 '24 16:07 tau-dev

Confirm that.

chrboesch avatar Sep 17 '24 19:09 chrboesch