HI, I have a Racket application that I need to run in a fairly memory constrained environment(1 GB ram) and I've ran into something I don't quite understand. The application is deserializing a fairly large data structure from disk on startup. After loading, current-memory-use <https://docs.racket-lang.org/reference/garbagecollection.html#%28def._%28%28quote._~23~25kernel%29._current-memory-use%29%29> reports about 1GB of memory in use, which matches the values reported by top(the application is running on Linux and top's VIRT/RES values are about 1GB/800MB for the process).
Then if I run (collect-garbage <https://docs.racket-lang.org/reference/garbagecollection.html#%28def._%28%28quote._~23~25kernel%29._collect-garbage%29%29> 'major), current-memory-use reports only about 300MB in use, but the VIRT/RES values reported by top do not change. The VIRT/RES values don't actually decrease until I unlink the variable pointing to the data structure and re-run collect-garbage. At that point top reports about 300MB when according to current-memory-use only about 80MB of memory is reachable. So, it seems that the memory used by Linux is lagging behind Racket's garbage collection. Is there an explanation for this? I need a way to fully release resources back to the OS as quickly as possible. Thanks, Jonathan -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.