archive mirror
 help / color / mirror / Atom feed
From: Nigel Cunningham <>
To: Linux Kernel Mailing List <>
Subject: 2.4.21-pre1: Memory leak in buffer code?
Date: Fri, 25 Apr 2003 12:49:04 +1200	[thread overview]
Message-ID: <1051231664.1662.7.camel@laptop-linux> (raw)


This script seems to reveal a memory leak of some sort in the buffer
code. I have run it on the same filesystem mounted as both ext2 and ext3
under 2.4.21-pre1, and in both cases get decreasing free memory and
increasing buffers. The line which activates the problem is the echo
which is directed to testlog.



while [ 1 ]; do
	MEMFREE=`head -2 /proc/meminfo | tail -1 | awk -F ' ' '{ print $4 }'`
	BUFFERS=`head -2 /proc/meminfo | tail -1 | awk -F ' ' '{ print $6 }'`
	echo -e -n "\rIteration $ITERATION. MemFree is $MEMFREE. Buffers is $BUFFERS"
	echo "Run $ITERATION beginning at `date`" > /testlog

I think I can also shed some light on a possible area to look at. I
originally found the problem while examining what appeared to be a
memory leak in swsusp. I set things up to bug on a page allocation where
the memory leak seemed to occur, and the page allocation was being
called from __pollwait in fs/select.c.

Hope this is helpful.


Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

Be diligent to present yourself approved to God as a workman who does
not need to be ashamed, handling accurately the word of truth.
	-- 2 Timothy 2:14, NASB.

                 reply	other threads:[~2003-04-25  0:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1051231664.1662.7.camel@laptop-linux \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).