Mockup of the new package os interface (incomplete and non-functioning)
This commit is contained in:
1 parent
3a4373641b
commit
ebbc33fdb5
21 files changed
+1621
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package os2
|
||||
|
||||
import "core:runtime"
|
||||
|
||||
heap_allocator :: proc() -> runtime.Allocator {
|
||||
return runtime.Allocator{
|
||||
procedure = heap_allocator_proc,
|
||||
data = nil,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
heap_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode,
|
||||
size, alignment: int,
|
||||
old_memory: rawptr, old_size: int, flags: u64 = 0, loc := #caller_location) -> rawptr {
|
||||
return _heap_allocator_proc(allocator_data, mode, size, alignment, old_memory, old_size, flags, loc);
|
||||
}
|
||||
|
||||
|
||||
@(private)
|
||||
error_allocator := heap_allocator;
|
||||
Reference in new issue
Block a user