This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: Try to gc when we run out of file handles
- To: Andrew Haley <aph at pasanda dot cygnus dot co dot uk>
- Subject: Re: Try to gc when we run out of file handles
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Mon, 26 Jun 2000 10:08:43 -0700 (PDT)
- Cc: java-patches at sourceware dot cygnus dot com
- References: <20000626143846.9000.qmail@pasanda.cygnus.co.uk>
Andrew> There's a memory and file descriptor leak in createTempFile().
Andrew> This fixes it, I think.
I think you can just call "desc.close()" at the end of createTempFile.
FYI there is a PR on this, so include the PR info in the ChangeLog
entry.
Andrew> * java/io/natFileDescriptorPosix.cc (open): Run gc when open()
Andrew> fails due to too many open files.
You probably want to call System.runFinalization after the GC.
This isn't a guarantee (for some collectors running the GC doesn't
even make sense), but it is still better than what we have now.
Tom