Function free [src]

Prototype

pub fn free( ctx: *anyopaque, buf: []u8, alignment: mem.Alignment, return_address: usize, ) void

Parameters

ctx: *anyopaquebuf: []u8alignment: mem.Alignmentreturn_address: usize

Source

pub fn free( ctx: *anyopaque, buf: []u8, alignment: mem.Alignment, return_address: usize, ) void { const self: *FixedBufferAllocator = @ptrCast(@alignCast(ctx)); _ = alignment; _ = return_address; assert(@inComptime() or self.ownsSlice(buf)); if (self.isLastAllocation(buf)) { self.end_index -= buf.len; } }