From: Frank Dwyer (dwyer@cs.fsu.edu)
Date: 07/31/93


From: dwyer@cs.fsu.edu (Frank Dwyer)
Subject: Memory leak in kernel/net-2?
Date: Sun, 1 Aug 1993 00:54:48 GMT

I've heard mention of a memory leak problem in recent Linux versions, but
haven't seen any fixes for the problem. My current installation seems to be
experiencing a bad memory leak, and I'd like to fix it. I'm also wondering
how widespread this problem is.

I'm using a 386/25 with 8M RAM, a WD ether card, .99pl11, Net-2, GCC 2.4.3,
4.4.1 libs & includes.

My problem can be reproduced; here's how:
=========================================

1) When I reboot, free reports the following--
             total used free shared buffers
Mem: 7188 3420 3768 2072 1048
Swap: 10196 0 10196

2) Now, do something that makes lots of work for the system. I just
   type "make" in /usr/src/linux to fake-make a new kernel (nothing gets
   recompiled, but all the make processes run).

   I would expect that the amount of RAM free before the make started and
   after it finished would be the same (or close, at least). However, free
   reports:
             total used free shared buffers
Mem: 7188 6036 1152 1928 1392
Swap: 10196 12 10184

   That's almost 2.6M in "lost" memory. The total resident size of running
   processes as reported by top is nowhere close to 6M.

It takes about 10 minutes of heavy pounding to make this machine crash, and
when memory runs low, I get lots of "No memory for IP forward" and "can't
allocate an sk_buf of XXX bytes" messages. I've seen lots of questions
about this error message on the net lately, and wonder if the problem might
relate to this memory problem.