From: Stephen L Johnson <sjohnson@monsters.org>
To: linux-kernel@vger.kernel.org
Subject: Memory leak in the ramfs file system
Date: Thu, 29 Mar 2001 16:06:54 -0600 [thread overview]
Message-ID: <200103292206.f2TM6sJ10808@zero.monsters.org> (raw)
A group of us from the handhelds.org site think that we have found a memory
leak in the ramfs file system. After a long period of create and deleting
small files in a mounted ramfs partition we have substantially less freemem.
The problem has been confirmed on 2.4.2 on an i386 and StormARM ports.
The problem was found by a developer running an application on an iPAQ that
quickly writes a 4K file to the ramfs, does some editing of the file and it
then deleted. The application will quickly eat up all free memory and cause
the platform to fail within 5 minutes.
Test case: from a shell, run this short script for a long period of time (over
1 hour):
i=0 ; while : ; do echo 1 >$i ; rm $i ; i=`expr $i + 1` ; done
This test was run on an Compaq iPAQ 3650 using the 2.4.2-rmk1-np3 kernel from
the CVS repository on cvs.handhelds.org.
The following two data points are the output from /proc/meminfo. The first
'cat' was done about 1 minute after the loop has been running. The second
'cat' was done 10 minutes after the script loop had been killed.
# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 31686656 21446656 10240000 0 0 11264000
Swap: 0 0 0
MemTotal: 30944 kB
MemFree: 10000 kB
MemShared: 0 kB
Buffers: 0 kB
Cached: 11000 kB
Active: 4656 kB
Inact_dirty: 4220 kB
Inact_clean: 2124 kB
Inact_target: 0 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 30944 kB
LowFree: 10000 kB
SwapTotal: 0 kB
SwapFree: 0 kB
# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 31686656 24178688 7507968 0 0 12357632
Swap: 0 0 0
MemTotal: 30944 kB
MemFree: 7332 kB
MemShared: 0 kB
Buffers: 0 kB
Cached: 12068 kB
Active: 4560 kB
Inact_dirty: 5384 kB
Inact_clean: 2124 kB
Inact_target: 16 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 30944 kB
LowFree: 7332 kB
SwapTotal: 0 kB
SwapFree: 0 kB
--
Stephen L Johnson <sjohnson@monsters.org>
next reply other threads:[~2001-03-29 22:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-29 22:06 Stephen L Johnson [this message]
2001-03-29 23:48 ` Memory leak in the ramfs file system Linus Torvalds
2000-06-12 20:50 ` Jaswinder Singh
2001-03-30 9:43 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2001-03-30 19:43 Amit D Chaudhary
2001-03-30 3:10 Amit D Chaudhary
2001-03-30 9:45 ` Jeff Garzik
2001-03-30 17:29 ` Amit D Chaudhary
2001-03-13 1:03 Fw: " Jaswinder Singh
2001-03-30 1:39 ` Jaswinder Singh
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200103292206.f2TM6sJ10808@zero.monsters.org \
--to=sjohnson@monsters.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.