aboutsummaryrefslogtreecommitdiff
path: root/core/os/os_darwin.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/os_darwin.odin')
-rw-r--r--core/os/os_darwin.odin25
1 files changed, 3 insertions, 22 deletions
diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin
index 82cf5e1f3..5a093b421 100644
--- a/core/os/os_darwin.odin
+++ b/core/os/os_darwin.odin
@@ -1,10 +1,10 @@
package os
foreign import dl "system:dl"
-foreign import libc "System.framework"
-foreign import pthread "System.framework"
+foreign import libc "system:System.framework"
+foreign import pthread "system:System.framework"
-import "core:runtime"
+import "base:runtime"
import "core:strings"
import "core:c"
@@ -859,25 +859,6 @@ access :: proc(path: string, mask: int) -> bool {
return _unix_access(cstr, mask) == 0
}
-heap_alloc :: proc(size: int, zero_memory := true) -> rawptr {
- if size <= 0 {
- return nil
- }
- if zero_memory {
- return _unix_calloc(1, size)
- } else {
- return _unix_malloc(size)
- }
-}
-heap_resize :: proc(ptr: rawptr, new_size: int) -> rawptr {
- // NOTE: _unix_realloc doesn't guarantee new memory will be zeroed on
- // POSIX platforms. Ensure your caller takes this into account.
- return _unix_realloc(ptr, new_size)
-}
-heap_free :: proc(ptr: rawptr) {
- _unix_free(ptr)
-}
-
lookup_env :: proc(key: string, allocator := context.allocator) -> (value: string, found: bool) {
runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD(ignore = context.temp_allocator == allocator)
path_str := strings.clone_to_cstring(key, context.temp_allocator)