[m-dev.] Catching out of memory errors

Paul Bone pbone at csse.unimelb.edu.au
Fri Oct 1 13:50:28 AEST 2010


On Fri, Oct 01, 2010 at 12:40:06PM +1000, Michael Day wrote:
> Hi,
> 
> It would be very useful to be able to catch out of memory errors,
> eg. throw a Mercury exception when the boehm gc fails an allocation,
> so that it can be caught and logged at the top level.
> 
> Is this idea utterly infeasible?

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?

If you're trying to profile the program for automatic parallelism please be
aware that you need to compile it with the extra option
--profile-for-implicit-parallelism.  This option must also be present in
Mmake.params while installing the compiler.  This includes some extra
information in the profile, but it re-enables some optimisations that make
understanding the profile of the program more difficult, therefore it is
disabled by default.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/developers/attachments/20101001/9eb2b8a6/attachment.sig>


More information about the developers mailing list