os2: Resolve temp allocator collisions
This commit is contained in:
1 parent
4a709086a4
commit
b9db1dd3e0
34 files changed
+319
-314
No files matched your search
@@ -5,9 +5,9 @@ import "base:runtime"
|
||||
import "core:sys/posix"
|
||||
|
||||
_get_executable_path :: proc(allocator: runtime.Allocator) -> (path: string, err: Error) {
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
|
||||
|
||||
buf := make([dynamic]byte, 1024, temp_allocator()) or_return
|
||||
buf := make([dynamic]byte, 1024, temp_allocator) or_return
|
||||
for {
|
||||
n := posix.readlink("/proc/curproc/exe", raw_data(buf), len(buf))
|
||||
if n < 0 {
|
||||
|
||||
Reference in new issue
Block a user