Is "Out of Memory" a recoverable error?

Jarrett Billingsley jarrett.billingsley at gmail.com
Tue Dec 2 09:04:44 PST 2008


On Tue, Dec 2, 2008 at 11:57 AM, Russell Lewis
<webmaster at villagersonline.com> wrote:
> 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.
>
> ...
>
> Thoughts?

I've considered this as well.  I've had a few occasions where I really
wanted something to trigger upon garbage collection.  Conveniently,
this is also dead easy to implement.



More information about the Digitalmars-d mailing list