classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] handle case with lots of unreferenced objects that has


From: Mark Wielaard
Subject: Re: [cp-patches] handle case with lots of unreferenced objects that has fd's open
Date: Fri, 05 Nov 2004 17:19:17 +0100

Hi,

On Fri, 2004-11-05 at 16:09, Noa Resare wrote:
> The attached patch runs System.gc() and System.runFinalization() if the
> native open() call returns FileNotFoundException (as it does when there
> are too many open files for the open(2) to succeed) and tries to open
> the file again.
> 
> Of course this is not guaranteed to work on every conceivable jvm that
> uses classpath, but on the other hand it does little harm other than
> delay the throwing of FileNotFoundException a little bit.
> 
> The patch is tested with jamvm and kaffe and fixes the manyopen mauve
> test referenced above on both.

The interface for the native open() isn't really optimal it seems.
The TARGET_NATIVE_FILE_OPEN macro seems to prevent us from detecting the
real reason for the file open call to fail. I think for now this is the
best we can do. But we should really redesign the platform specific
interface for this class so that the underlying system can signal what
went wrong for which reason.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]