On Saturday, 27 June 2020 at 11:00:58 UTC, Stanislav Blinov wrote:
On Saturday, 27 June 2020 at 10:08:15 UTC, James Gray wrote:

I find that the memory usage grows to about 1.5GB and never decreases. Is there something I am not understanding?

How are you measuring that? GC.collect() does not necessarily release the pages to the OS. For that, there's the GC.minimize().

I am measuring the memory usage using top from the command line.
GC.minimize() does seem to stop the leak. But it doesn't explain why the program isn't releasing essentially all the memory between calls to f (it using around 2GB ram all the time). Is there a way of achieving that?

Reply via email to