diff options
Diffstat (limited to 'core/os/os_windows.odin')
| -rw-r--r-- | core/os/os_windows.odin | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/core/os/os_windows.odin b/core/os/os_windows.odin index 7b4c2f6c2..b375e7c66 100644 --- a/core/os/os_windows.odin +++ b/core/os/os_windows.odin @@ -2,8 +2,8 @@ package os import win32 "core:sys/windows" -import "core:runtime" -import "core:intrinsics" +import "base:runtime" +import "base:intrinsics" Handle :: distinct uintptr File_Time :: distinct u64 @@ -91,28 +91,6 @@ last_write_time_by_name :: proc(name: string) -> (File_Time, Errno) { } - -heap_alloc :: proc(size: int, zero_memory := true) -> rawptr { - return win32.HeapAlloc(win32.GetProcessHeap(), win32.HEAP_ZERO_MEMORY if zero_memory else 0, uint(size)) -} -heap_resize :: proc(ptr: rawptr, new_size: int) -> rawptr { - if new_size == 0 { - heap_free(ptr) - return nil - } - if ptr == nil { - return heap_alloc(new_size) - } - - return win32.HeapReAlloc(win32.GetProcessHeap(), win32.HEAP_ZERO_MEMORY, ptr, uint(new_size)) -} -heap_free :: proc(ptr: rawptr) { - if ptr == nil { - return - } - win32.HeapFree(win32.GetProcessHeap(), 0, ptr) -} - get_page_size :: proc() -> int { // NOTE(tetra): The page size never changes, so why do anything complicated // if we don't have to. |