mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Rename os.default_allocator to os.heap_allocator
This commit is contained in:
+3
-3
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user