Closed mrjackwills closed 10 months ago
After "Finished" is printed to stdout, the application is still reportedly holding on to 150mb of memory.
It's simply how allocators work. They often do not release memory to OS immediately and release itself is done using MADV_FREE
, so pages would continue to "belong" to an application until OS experiences significant memory pressure.
Yeah I guessed it was something simple like that, I was just having trouble as my application is run in a Docker container that has an artificially constrained memory limit. I will just increase the limit - or build for musl.
I think I am suffering from the same memory issue as detailed in issue 478.
The application is as so;
After "Finished" is printed to stdout, the application is still reportedly holding on to 150mb of memory. This has been tested on my home x86 Debian linux laptop, and a remote x86 Ubuntu linux server.
However, building for
x86_64-unknown-linux-musl
the memory gets freed immediately when you'd expect. So my guess is that this is something related to the x86 gnu build/run step - this area of Rust goes slightly over my head.I don't know what the most reliable way to record memory usage/held memory is. I was was just a combination of
htop
,ps
, andtop
. I can provide some kind of screen recording would offer any kind of help.