Scyld: memory leak or just caching?
agrajag at scyld.com
Wed Jun 27 14:32:26 PDT 2001
On Wed, 27 Jun 2001, Mike Weller wrote:
> Sean wrote:
> > Sounds like just caching to me. However, if you want to double check,
> > write a simple program that malloc()'s about 100M, bpsh it over there
> > and see what happens.
> Ok, I wrote a program to allocate 100M of RAM. "ps -leaf" reports
> 100M used by the program (taking SZ * 4096k/page). However, "free"
> reports an increase of only 100k, and no swap was used. Does the
This indicates that the usage you were seeing was just disk cache. The
kernel automatically caches data that you read off the disk into ram so
that the next time you make the request, you don't actually have to use
the disk and thus get it much faster. As part of this, when you need to
use more ram, it automagically shrinks the size of the cache its using
so that there will be enough space for the memory you want to allocate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 232 bytes
Desc: not available
Url : http://www.scyld.com/pipermail/beowulf/attachments/20010627/4b0cc523/attachment.bin
More information about the Beowulf