Is "Out of Memory" a recoverable error?

Nick Sabalausky a at a.a
Wed Dec 3 02:23:05 PST 2008


"Walter Bright" <newshound1 at digitalmars.com> wrote in message 
news:gh38om$m7r$1 at digitalmars.com...
>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

I haven't looked at any of the other responses yet, but I'd have to say 
"sometimes". Clearly, getting an out of memory when trying to instantiate a 
trivial class is nonrecoverable (unless it's happening within a section of 
memory-intensive code that's allowed to fail, and the rest of the program 
does very little allocation), but getting an out of memory when trying to 
allocate a 1GB buffer for video processing is certainly recoverable. 





More information about the Digitalmars-d mailing list