Is "Out of Memory" a recoverable error?

Sean Kelly sean at invisibleduck.org
Tue Dec 2 10:19:32 PST 2008


== Quote from Russell Lewis (webmaster at villagersonline.com)'s article
> Walter Bright wrote:
> > I asked this over on stackoverflow.com to see what people using other
> > languages have to say, as well as the D community. The reason I ask is
> > to see if memory allocation can be allowed in functions marked "nothrow".
> >
> > http://stackoverflow.com/questions/333736/is-out-of-memory-a-recoverable-error
> It seems that D has (or rather, can have) a trivial solution to this
> problem.  Allow programs to register with the GC when they have memory
> which can be easily freed (caches and such).  Then you can make "out of
> memory" a non-recoverable error, since it only hits when we fail to
> recover enough.

Interesting idea.  It would certainly be easy enough to add to the GC.


Sean



More information about the Digitalmars-d mailing list