Is "Out of Memory" a recoverable error?

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

== Quote from Russell Lewis (webmaster at's article
> Walter Bright wrote:
> > I asked this over on 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".
> >
> >
> 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.


More information about the Digitalmars-d mailing list