-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
GCGarbage collectorGarbage collector
Description
julia> versioninfo()
Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
Threads: 4 on 8 virtual cores
Environment:
JULIA_CONDAPKG_OFFLINE = yes
I often see that my code is killed due to out-of-memory. This happens when using pmap, but also when running single threaded single process code that allocates a lot repeatedly from the repl. I tried to add --heap-size-hint, but it did not help.
My workaround: I added the following code to all functions that allocate a lot:
if Sys.free_memory()/2^30 < 6.0
GC.gc()
end
This should not be needed, the garbage collector should do a full collection before the system runs out of memory on its own.
musokePallHaraldsson
Metadata
Metadata
Assignees
Labels
GCGarbage collectorGarbage collector