blob: 443f41a510fa77908d395837a7d42d1d15e549b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//+build freestanding
package runtime
// mem.nil_allocator reimplementation
default_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
size, alignment: int,
old_memory: rawptr, old_size: int, loc := #caller_location) -> ([]byte, Allocator_Error) {
return nil, .None;
}
default_allocator :: proc() -> Allocator {
return Allocator{
procedure = default_allocator_proc,
data = nil,
};
}
|