diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index 71bbfc70ee937..f0323d0334b1a 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -1234,7 +1234,7 @@ function take_heap_snapshot(filepath::String, all_one::Bool=false) return filepath end function take_heap_snapshot(all_one::Bool=false) - f = abspath("$(getpid())_$(time_ns()).heapsnapshot") + f = joinpath(tempdir(), "$(getpid())_$(time_ns()).heapsnapshot") return take_heap_snapshot(f, all_one) end