kym-tables-overhaul #30
|
@ -29,7 +29,7 @@ pub const Allocator = struct {
|
||||||
const ErasedActions = struct {
|
const ErasedActions = struct {
|
||||||
fn deallocate(context: *anyopaque, allocation: []Byte) void {
|
fn deallocate(context: *anyopaque, allocation: []Byte) void {
|
||||||
if (is_zero_aligned) {
|
if (is_zero_aligned) {
|
||||||
return actions.deallocator(@ptrCast(context), allocation);
|
return actions.deallocate(@ptrCast(context), allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
return actions.deallocate(@ptrCast(@alignCast(context)), allocation);
|
return actions.deallocate(@ptrCast(@alignCast(context)), allocation);
|
||||||
|
@ -37,7 +37,7 @@ pub const Allocator = struct {
|
||||||
|
|
||||||
fn reallocate(context: *anyopaque, return_address: usize, existing_allocation: ?[]Byte, size: usize) AllocationError![]Byte {
|
fn reallocate(context: *anyopaque, return_address: usize, existing_allocation: ?[]Byte, size: usize) AllocationError![]Byte {
|
||||||
if (is_zero_aligned) {
|
if (is_zero_aligned) {
|
||||||
return actions.reallocator(@ptrCast(context), return_address, existing_allocation, size);
|
return actions.reallocate(@ptrCast(context), return_address, existing_allocation, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
return actions.reallocate(@ptrCast(@alignCast(context)), return_address, existing_allocation, size);
|
return actions.reallocate(@ptrCast(@alignCast(context)), return_address, existing_allocation, size);
|
||||||
|
|
Loading…
Reference in New Issue