1

I simply started 5 instances of the default xterm, doing nothing in them at all.

Looking at the output from htop, it appears that these instances use different amounts of RAM:

VIRT        RES       SHR       Command
12632       8528      4916       xterm
12632       8528      4920       xterm
12616       8496      4900       xterm
12616       8464      4868       xterm
12616       8452      4856       xterm

I know the differences are slight, but it does peak my curiosity. Google was unhelpful. Does anyone know why there are these small differences?

2

Most programs allocate memory as needed during their execution (asking for more memory from the operating system). They rarely give back memory (most of the time, after running a while the memory will be a mosaic of used and currently free pieces of different sizes, compacting that to free a contiguous are that can be returned is extra work, rarely worth it). Thus different memory usage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.