| ... | @@ -273,6 +273,10 @@ pub const FixedBufferAllocator = struct { | ... | @@ -273,6 +273,10 @@ pub const FixedBufferAllocator = struct { |
| 273 | buffer: []u8, | 273 | buffer: []u8, |
| 274 | | 274 | |
| 275 | pub fn init(buffer: []u8) FixedBufferAllocator { | 275 | pub fn init(buffer: []u8) FixedBufferAllocator { |
| | 276 | // This loop gets optimized out in ReleaseFast mode |
| | 277 | for (buffer) |*byte| { |
| | 278 | byte.* = undefined; |
| | 279 | } |
| 276 | return FixedBufferAllocator{ | 280 | return FixedBufferAllocator{ |
| 277 | .allocator = Allocator{ | 281 | .allocator = Allocator{ |
| 278 | .allocFn = alloc, | 282 | .allocFn = alloc, |