Is "Out of Memory" a recoverable error?

Walter Bright newshound1 at digitalmars.com
Thu Dec 4 10:34:02 PST 2008


Nick Sabalausky wrote:
> 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. 

There aren't going to be very many instances in code where one allocates 
1Gb, so those can be handled as special cases.



More information about the Digitalmars-d mailing list