On 04/18/2014 02:07 PM, Cristian Rodríguez wrote:
El 18/04/14 14:46, Lars Kruczynski escribió:
So is it normal behavior for plasma-desktop to balloon in size to 500 MB after opening up and closing multiple widgets and closing them, switching activities, etc?
Yes, closing widgets does not mean memory will be returned to the kernel. not even glibc operates that way.
True, but then the code in glibc is highly shared. Look at it this way: the page holding code for a closed program stay in memory even after the program exits. They are added to the 'dirty page queue' but being code rather than data never get re-written to disk. If something else needs a page it gets pulled of that queue. In fact the pages in use are on a LRU queue and even active but dormant programs might have code pages reclaimed. That's why we talk of the "resident set" and of the "working set" of pages. Quite obviously any start-up code and initialization code that is used one and once only can be paged out. There have been papers written about how to get the complier-linker-loader to put one-only and least-used code in its own pages that have no overlap with the working set. It is the working set that really matters. That has to be present. I suspect that if your process has a memory leak and keeps growing, resident set will eventually stop growing -- because for every new page you use, the kernel will evict one page from your process. In the extreme case there is a top end on how much virtual memory a process can have. Repeated plugins and repeated un-freed malloc()s (aka memory leaks) might eventually reach that point. Run ulimit -a to find out. You should also look at the settings in /etc/security/limits.conf run man 5 limits.conf man 1 prlimit man 8 pam_limits -- The United States is a nation of laws: badly written and randomly enforced. Frank Zappa -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org