Subject: Re: find uses 400MB memory
To: Simon Burge <simonb@wasabisystems.com>
From: Kazushi (Jam) Marukawa <jam@pobox.com>
List: current-users
Date: 09/14/2001 02:02:30
   On Sep 14, 16:38, Simon Burge wrote:
   > Subject: Re: find uses 400MB memory
   > >   $ ps aux
   > >   USER    PID %CPU %MEM  VSZ   RSS TT STAT STARTED    TIME COMMAND
   > >   root    6776 11.5  0.2 404852   600 p4 S+    6:16PM  3:16.66 find . -type f -ex
   > 
   > Just a quick observation - notice how it's only 600k resident.  Seems
   > like classic memory leak.  I wonder if "-ex" allocates some memory
   > and doesn't free it (either directly or indirectly through a library
   > routine)?
   > 
   > I'm guessing that just "find . -type f -print" wouldn't use that
   > much memory, and hence it's not a fts(3) problem per se.

That's true.  I did quick check by "find . -type f -print"
on the same disk and it didn't use memory so much.  Sorry
for doubting fts.  I should check -print first.  Thank you
for the correction.

BTW, what I did is "-exec crc-calc-program '{}' \;'.

Regards,
-- Kazushi