This is the mail archive of the
mailing list for the Cygwin project.
RE: Possible memory leak problem using "find"?
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 21 Jul 2006 17:52:10 +0100
- Subject: RE: Possible memory leak problem using "find"?
On 21 July 2006 17:13, andrew.singleton@hsbcgroup wrote:
> I have observed the page file usage in Windows Task Manger whilst running a
> find command in cygwin. The usage steadily climbs up by about 0.5-1MB per
> second whilst the command is running and then stops climbing when the
> command is completed. The PF Usage does not return to the level it was out
> before the command ran. If I run the "find" enough times I eventually run
> out of memory and windows starts sending me error messages.
This is not the fault of a user-mode program. There is no way a user-mode
program can leave memory allocated after it exits. A faulty device driver can
leak memory whilst performing I/O _on behalf of_ a user-mode program, and that
leak will never be reclaimed because the system can't make assumptions on
behalf of the driver about whether it still needs that memory or not.
BTW, there's nothing on my version of task manager called "PF usage". Do
you mean "commit charge"? If not, what is the *actual* text next to the
number you're seeing change? Even more importantly, check what's happening to
the kernel memory figures at the same time - is the "Paged" figure growing in
the same way as whatever other statistic it is you're referring to?
> I'm running the command inside various scripts in bash-3.1. The effect
> happens when running scripts that contain the find command and does not
> happen when other scripts are run. In one script the find is run many times
> inside a loop and in another script the find is only run once. The effect
> on PF Usage is more noticable when the script with the loop is run.
> the find command is being run on a directory structure in Rational
Ah. Try it on a different drive or directory tree that doesn't use the
Rational FS. Or perhaps see if you can disable your AV software temporarily
while doing it; it could be either Rational or your AV or even a bad
interaction between the two that's doing this.
Can't think of a witty .sigline today....
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html