mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-08 23:04:24 +00:00
10 lines
265 B
Zig
10 lines
265 B
Zig
pub error NoMem;
|
|
|
|
pub type Context = u8;
|
|
pub struct Allocator {
|
|
alloc: fn (self: &Allocator, n: isize) -> %[]u8,
|
|
realloc: fn (self: &Allocator, old_mem: []u8, new_size: isize) -> %[]u8,
|
|
free: fn (self: &Allocator, mem: []u8),
|
|
context: ?&Context,
|
|
}
|
|
|