4 ms·
No, it isn't a leak as the containers are empty but not garbage. It is very common to allocate extra memory that isn't used - in garbage collected languages yo
by bluGill 5y ago
No, it isn't a leak as the containers are empty but not garbage. It is very common to allocate extra memory that isn't used - in garbage collected languages you often need to fight the garbage collector for maximum performance in specific ways - which means you will have empty objects just waiting to be filled. You will get around to them eventually, but for now they are just taking up memory. If you allocate more of these objects than you have physical ram you will start swapping - but there is no leak, you will eventually either use them, or destroy them.
If you don't worth in latency senstive applications you might not have encountered a situation where you need to apply the above tricks.
- tuatoru 5y agoLol! Continuing this analogy, what has happened is that the swap space for containers has filled, and it now has a form of compression applied to it, so that five containers can now be stored in the space where two could be beforehand. (Edit: let's hope the swap space doesn't become encrypted.) I wonder when the out-of-memory-killer process will start up? What would it look like--just not shipping anything to the US for a few months?