Boost logo

Boost Users :

Subject: Re: [Boost-users] Memory deallocation concerning boost::bind, boost::asio and shared_ptr
From: Norman (kradepon_at_[hidden])
Date: 2016-05-10 10:29:20

My first approach was to search for leaks with Valgrind and i didn't find
any. Also i never mentioned any leaks, so that's not my concern. The only
problem i had/have is, that the RSS is not decreasing during runtime, even
after a long time when my application is not using the allocated memory
For instance i connected 30.000 dummy clients to my server, so the memory
consumption went up to ~ 50% of my available memory. Then i disconnected
them (leading to a lot of destructed objects), which should lead to a lot of
freed memory. But my application still claims 50% of my RAM, according to
RSS. If i now connect another 30.000 clients, my RSS changes only
marginally. But i cannot understand, why my application never releases any
of the claimed memory to the OS. It feels like there is some kind of a
capacity inside the application (a map-like container for instance), which
can only increase and will never decrease. Since its capacity does never
decrease, the claimed memory won't be released.

@Oswin Krause
It's more of a practical concern. Since i never observed my OS 'reclaiming'
the virtual pages, i don't know if this will ever happen. All i observed, is
that my application claimed some memory and never released it (or at least
only an alternating small portion of it).

View this message in context:
Sent from the Boost - Users mailing list archive at

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at