free
Function parameters
Parameters
- ctx:*anyopaque
- old_mem:[]u8
- alignment:mem.Alignment
- ra:usize
Type definitions in this namespace
Types
Functions in this namespace
Functions
- getStackTrace
- Only valid once `has_induced_failure == true`
Source
Implementation
fn free(
ctx: *anyopaque,
old_mem: []u8,
alignment: mem.Alignment,
ra: usize,
) void {
const self: *FailingAllocator = @ptrCast(@alignCast(ctx));
self.internal_allocator.rawFree(old_mem, alignment, ra);
self.deallocations += 1;
self.freed_bytes += old_mem.len;
}