Just for fun, I wanted to watch what ls -lR / does to my buffers memory on a Linux system. As expected, the value increased. But I noticed that the application memory (i.e. used - (buffers + cache)) also increased, and it did not drop back down after the command was finished.So I tested it again after a reboot and with as few applications running as possible (in case some other application was using the memory and I did not notice). I recorded top -b -n 1 output before and afterwards:$ free -m             total       used       free     shared    buffers     cachedMem:          3879        413       3466          1         63        232-/+ buffers/cache:        117       3762Swap:         7059          0       7059$ top -b -n 1top - 19:33:36 up 11 min,  1 user,  load average: 0,00, 0,02, 0,05Tasks: 130 total,   1 running, 129 sleeping,   0 stopped,   0 zombie%Cpu(s):  0,3 us,  0,2 sy,  0,0 ni, 97,9 id,  1,5 wa,  0,0 hi,  0,0 si,  0,0 stKiB Mem:   3972908 total,   423356 used,  3549552 free,    65308 buffersKiB Swap:  7229324 total,        0 used,  7229324 free.   238424 cached Mem(process list omitted)$ ls -lR /(output omitted)$ free -m             total       used       free     shared    buffers     cachedMem:          3879       1293       2586          1        315        252-/+ buffers/cache:        725       3154Swap:         7059          0       7059$ top -b -n 1top - 19:36:19 up 14 min,  1 user,  load average: 0,33, 0,25, 0,13Tasks: 130 total,   1 running, 129 sleeping,   0 stopped,   0 zombie%Cpu(s):  0,4 us,  2,2 sy,  0,0 ni, 95,5 id,  1,8 wa,  0,0 hi,  0,0 si,  0,0 stKiB Mem:   3972908 total,  1324492 used,  2648416 free,   322580 buffersKiB Swap:  7229324 total,        0 used,  7229324 free.   258976 cached Mem(process list omitted)The process list in stayed exactly the same (except for some changes in the TIME+ column and the top process itself, of course), showing that no process is actually using the extra half Gigabyte of memory. So my question is: what uses this memory and will it be freed eventually? Also, will the same thing also happen when I use my system for a long time and access the file system a lot?
What uses Linux application memory?
process;memory;ls