| ... | ... | @@ -200,12 +200,9 @@ pub fn allocAdvancedWithRetAddr( |
| 200 | 200 | n: usize, |
| 201 | 201 | return_address: usize, |
| 202 | 202 | ) Error![]align(alignment orelse @alignOf(T)) T { |
| 203 | | const a = if (alignment) |a| blk: { |
| 204 | | if (a == @alignOf(T)) return allocAdvancedWithRetAddr(self, T, null, n, return_address); |
| 205 | | break :blk a; |
| 206 | | } else @alignOf(T); |
| 203 | const a = alignment orelse @alignOf(T); |
| 207 | 204 | |
| 208 | | // The Zig Allocator interface is not intended to solve allocations beyond |
| 205 | // The Zig Allocator interface is not intended to solve alignments beyond |
| 209 | 206 | // the minimum OS page size. For these use cases, the caller must use OS |
| 210 | 207 | // APIs directly. |
| 211 | 208 | comptime assert(a <= mem.page_size); |