[m-dev.] Catching out of memory errors

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Oct 1 15:44:20 AEST 2010


On Fri, 1 Oct 2010, Michael Day wrote:

> > That depends on how the error is being reported.  I not comfortable speculating
> > about this without more information, Can you show me an example?  Is this
> > happening only in deep profiling grades?
>
> No, regular asm_fast.gc grade, when you try to allocate too much the
> boehm gc dumps this and aborts:
>
> "GC out of memory.  Returned NIL!"
>
> It's not very helpful if you want to control what you write to the
> terminal and indicate failure in a more graceful manner. Ideally
> allocation failure would be reported via a Mercury exception that could
> be caught at the top level and reported nicely.

The problem there is that it is likely that your exception handler is
going to have to allocate memory for handling the exception ...

Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list