/proc/meminfo, documentation neaded, memory leaks?

Pavel Machek (pavel@Elf.mj.gts.cz)
Mon, 25 Aug 1997 20:05:16 +0200


Hi!

First, would one of 'enlightened' hackers go ahead and write
meminfo.txt - description of what is what in memorymanagment?

Then: My memory probably leaks, too - but I do not know how to induce
it. I saw similar things on one notebook (with something as old as
2.1.42) - which could not compile kernel because it swapped and
swapped and swapped...

[This is 2.1.51, patched so that meminfo is compatible with older
ones. It has some more patches => more info in meminfo. I hope that my
patches are not _so_ broken to leak memory...].

root@Elf:~# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 19238912 17788928 1449984 5021696 270336 4161536
Swap: 22704128 2838528 19865600
MemTotal: 18788 kB
MemFree: 1416 kB
MemShared: 4904 kB
Buffers: 264 kB
Cached: 4064 kB
SwapTotal: 22172 kB
SwapFree: 19400 kB
root@Elf:~# echo $[1416+4904+264+4064]
10648
root@Elf:~#

Looks like at least 6Megs are missing. (Could be more due to shared
pages computed more than once.... If I do not understand that
correctly, please go ahead and write some Documentation/meminfo.txt
for me ;-)

: Free pages: 380kB
: ( 12*4kB 19*8kB 8*16kB 7*32kB 4*64kB 59*128kB = 8360kB)
~~~~~~~~~~~~~~~~~
What's this? I thought that this is expected to be free memory by page
size...? If so, why is 8meg free in 128kb pages, when machine is
swapping?!

: Swap cache: add 3386/3386, delete 2290460/2219, find 12733/1159
: Free swap: 19380kB
: 5120 pages of RAM
: 2190 free pages
: 423 reserved pages
: 1351 pages shared
: 95 + 971 fast + slow free pages
: Buffer memory: 216kB
: Buffer heads: 252
: Buffer blocks: 216
: CLEAN: 128 buffers, 0 used (last=0), 0 locked, 0 protected, 0 dirty
: LOCKED: 23 buffers, 14 used (last=18), 0 locked, 0 protected, 0 dirty
: DIRTY: 62 buffers, 5 used (last=42), 0 locked, 0 protected, 62 dirty
: Networking buffers in use : 0
: Total network buffer allocations : 256494
: Total failed network buffer allocs : 0
: IP fragment buffer size : 0
Pavel

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).