lkml.org 
[lkml]   [2003]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.4.21-pre1: Memory leak in buffer code?
Hi.

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.

#!/bin/bash

RUN=1

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
ITERATION=$(($ITERATION+1))
done

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

--
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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.027 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site