opensubscriber
   Find in this group all groups
 
Unknown more information…

g : glasgow-haskell-users@haskell.org 19 April 2012 • 11:44PM -0400

Re: "containing" memory-consuming computations
by Bardur Arantsson

REPLY TO AUTHOR
 
REPLY TO GROUP




On 04/19/2012 12:45 PM, Herbert Valerio Riedel wrote:
> Hello GHC Devs,
>
> But I'm missing a similar facility for constraining the
> space-dimension. In some other languages such as C, I have (more or
> less) the ability to check for /local/ out-of-memory conditions (e.g. by
> checking the return value of e.g. malloc(3) for heap-allocations, or by
> handling an OOM exception), rollback the computation, and be able to

Just a minor point which may be of interest: Many operating systems
(including Linux by default) overcommit memory, so there is in fact no
guarantee that memory returned by malloc() will in fact be usable under
memory pressure.

So, getting a non-NULL pointer from malloc() is not a guarantee.

(There are good reasons for this behavior.)

Regards,


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@hask...
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.