out of memory
Godmar Back
gback at cs.utah.edu
Sat Jan 9 17:24:50 PST 1999
>
> This is a quote from gc_heap_malloc:
>
> /*
> * If we ran out of memory, a OutOfMemoryException is
> * thrown. If we fail to allocate memory for it, all
> * is lost.
>
> If there is not enough memory for an OutOfMemoryException, kaffe crashes
> with "Segmentation fault" and no message, which is pretty annoying. I see
> no reason why the objects needed to throw this exception cannot be
> allocated in advance such that kaffe could always throw this exception and
> exit decently (if the exception is not caught by the app).
> Am I missing something here?
>
It is true that out of memory exceptions are broken in kaffe.
This is noted in the FAQ.
One of the more obvious things needed to fix them is to preallocate
the exception. However, there's a lot more to it. For instance,
we must ensure that there is enough memory to throw (and possibly
catch the exception and continue after a gc if the application drops some
objects). This may involve just-in-time compiling code, which requires
memory.
More importantly, we must ensure that the VM does not throw the exception
when executing protected sections of code.
This will be implemented.
I agree with you that an interim solution that at least allows to exit kaffe
decently would be nice to have.
- Godmar
More information about the kaffe
mailing list