diff options
Diffstat (limited to 'std')
| -rw-r--r-- | std/heap.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/std/heap.zig b/std/heap.zig index 9156dfe936..f309a08a8a 100644 --- a/std/heap.zig +++ b/std/heap.zig @@ -17,7 +17,8 @@ var c_allocator_state = Allocator { }; fn cAlloc(self: &Allocator, n: usize, alignment: u29) ![]u8 { - return if (c.aligned_alloc(alignment, n)) |buf| + assert(alignment <= @alignOf(c_longdouble)); + return if (c.malloc(n)) |buf| @ptrCast(&u8, buf)[0..n] else error.OutOfMemory; |
