This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Huge memory leak, probably related to making new processes


> How do you know it is leaking memory? If you are looking at Windows Task 
Manager or some similar program, then you're probably just being misled. 
The OS will automatically free the memory from each "echo" process after 
it terminates, but it may not always immediately report it as available.

-Lewis
<
Yes, I am using Windows Task Manager. Actually, it is leaking. I discovered
the leak when I had like 10 programs running when I started a simple find
just like the ones I posted. I searched a big collection of files (several
tens of MB). After a while, I noticed it still didn't finish (I expected it
to be done at the time) and that my computer is behaving somewhat strangely.
I started closing one program at the time, but that was quite slow and
getting worse. Then I noticed that HDD led was on most of the time. I
launched Task Manager and it showed that my memory is <15MB (on a 2GB
machine). I was assuming (with the programs launched) that around 1GB or so
would be free - well, it was not. I restarted the machine, ~1.5GB free. All
after that is history (i.e. I performed the tests from my previous post and
I got the offender). Does this sound as a reasonable test to you? 

Anyway, can I ask you to do this yourself - just do the last test:

COUNTER=1
while [ $COUNTER -lt 123456 ]; do (echo $COUNTER); let COUNTER=$COUNTER+1;
done 

and wait a little (couple of minutes). If necessary, repeat it until your
memory drops to 10-20 MB range and your HDD should start whining. Then close
cygwin and wait 10 minutes. The memory is still "occupied". I don't know
when Windows would free it, but I did not get that behavior with any other
program (e.g. try to open & close Firefox or such - it will show a peak in
both directions regarding memory and will do that almost immediately).

Thanks for the note.
-- 
View this message in context: http://www.nabble.com/Huge-memory-leak%2C-probably-related-to-making-new-processes-tf4557470.html#a13010714
Sent from the Cygwin Users mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]