Rename os.default_allocator to os.heap_allocator

This commit is contained in:
gingerBill
2018-06-03 16:40:58 +01:00
parent 360a74e2fe
commit e46662a546
4 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -66,7 +66,7 @@ read_ptr :: proc(fd: Handle, data: rawptr, len: int) -> (int, Errno) {
}
default_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode,
heap_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode,
size, alignment: int,
old_memory: rawptr, old_size: int, flags: u64 = 0, loc := #caller_location) -> rawptr {
using mem.Allocator_Mode;
@@ -91,9 +91,9 @@ default_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode,
return nil;
}
default_allocator :: proc() -> mem.Allocator {
heap_allocator :: proc() -> mem.Allocator {
return mem.Allocator{
procedure = default_allocator_proc,
procedure = heap_allocator_proc,
data = nil,
};
}
+1 -1
View File
@@ -276,7 +276,7 @@ __init_context_from_ptr :: proc "contextless" (c: ^Context, other: ^Context) {
__init_context :: proc "contextless" (c: ^Context) {
if c == nil do return;
c.allocator = os.default_allocator();
c.allocator = os.heap_allocator();
c.thread_id = os.current_thread_id();
}