Hi, The exact behaviour depends on your run-time implementation. It is most likely not very much memory that the run-time is claiming. Have you seen any issue in practice? Or is it a theoretical problem like "when do I get my 2 MB of my 64GB memory back?" On 2016-05-10 14:40, Norman wrote:
I understand, that the RSS is not a direct indicator for 'unused' memory. Since I obviously have problems to clearify my problem, i made another example:
Converging memory consumption example http://melpon.org/wandbox/permlink/i5k59o38K8azDX2o
In this example, the amount of memory beeing allocated by the programm converges to a limit, which shows exactly what you told me. So the C++ runtime holds on to some allocated memory, even though the objects have been 'freed', meaning that the application does not need to allocate more memory for every function call.
My problem with this behaviour is, that my application should run for an infinit amount of time. It's a server application, which allocates a greater amount of memory in between. So if this memory is allocated for a little while, even when the memory is 'not in use' anymore, that's fine with me. But at some time, the memory needs to be released to the OS. And that's exactly where my problem appears. I don't know, if the memory will ever be reclaimed by the OS. Of course, RSS does not tell me how much memory my application is currently using, but it tells me at least the minimum amount of memory currently managed by the C++ runtime. And if this increases to a huge amount, my OS does not have access to this memory, right?
So my remaining question is, if the ioService object will (or more precisly the C++ runtime) will ever release the allocated memory to the OS or if i have to do this manually.
-- View this message in context: http://boost.2283326.n4.nabble.com/Memory-deallocation-concerning-boost-bind... Sent from the Boost - Users mailing list archive at Nabble.com. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users