mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
os2: Resolve temp allocator collisions
This commit is contained in:
@@ -127,7 +127,7 @@ _process_info_by_pid :: proc(pid: int, selection: Process_Info_Fields, allocator
|
||||
break args
|
||||
}
|
||||
|
||||
buf := runtime.make_aligned([]byte, length, 4, temp_allocator())
|
||||
buf := runtime.make_aligned([]byte, length, 4, temp_allocator)
|
||||
if sysctl(raw_data(mib), 3, raw_data(buf), &length, nil, 0) != .OK {
|
||||
if err == nil {
|
||||
err = _get_platform_error()
|
||||
@@ -239,9 +239,9 @@ _process_list :: proc(allocator: runtime.Allocator) -> (list: []int, err: Error)
|
||||
return
|
||||
}
|
||||
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
|
||||
|
||||
buffer := make([]i32, ret, temp_allocator())
|
||||
buffer := make([]i32, ret, temp_allocator)
|
||||
ret = darwin.proc_listallpids(raw_data(buffer), ret*size_of(i32))
|
||||
if ret < 0 {
|
||||
err = _get_platform_error()
|
||||
|
||||
Reference in New Issue
Block a user