diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index 44032fce2da1b..13d1d1e93e2e5 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -1262,7 +1262,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