This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


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

Re: Try to gc when we run out of file handles


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

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