We have problem with embedded linux boxes. Some boxes has a memory leak.
None of the processes does not hold the leaked memory.
After killing all possible processes, the leak still exists. When looking from /proc/meminfo, it seems that leaked memory is under Inactive memory:
~ # echo 1 > /proc/sys/vm/drop_caches ; cat /proc/meminfo
MemTotal: 126744 kB
MemFree: 107684 kB
Buffers: 0 kB
Cached: 1160 kB
SwapCached: 0 kB
Active: 1204 kB
Inactive: 12532 kB
SwapTotal: 0 kB
SwapFree: 0 kB
...
~ # ps
PID USER VSZ STAT COMMAND
1 root 2748 S init
2 root 0 SW< [kthreadd]
3 root 0 SW< [ksoftirqd/0]
4 root 0 SW< [events/0]
5 root 0 SW< [khelper]
31 root 0 SW< [kblockd/0]
42 root 0 SW< [khubd]
48 root 0 SW< [kmmcd]
82 root 0 SW [pdflush]
83 root 0 SW [pdflush]
84 root 0 SW< [kswapd0]
85 root 0 SW< [aio/0]
170 root 0 SW< [rpciod/0]
176 root 0 SW< [mmcqd]
1346 root 2756 S telnetd -l /bin/login
1347 root 2856 S -sh
3737 root 2856 R ps
~ #
Ram disks are not in use. Linux version is 2.6.25.9.
Is there any way to find reason why the Inactive memory increases all the time? Is it possible to flush or drop Inactive memory?