Xinok Sort Update

Vladimir Panteleev vladimir at thecybershadow.net
Sat Oct 29 16:19:51 PDT 2011


On Sun, 30 Oct 2011 01:56:23 +0300, Timon Gehr <timon.gehr at gmx.ch> wrote:

> You could use catch(Error err) or catch(OutOfMemoryError err) or not  
> catch the Error at all.

Note that (IIRC) an OutOfMemoryError will be thrown only when:
1) There is no space on the managed heap
2) A garbage collection cycle failed to free enough memory for the  
requested allocation
3) The operating system could not allocate any more memory, even from swap.

Some operating systems (Windows) will even expand the swap file  
automatically when it nears being full.

I don't think that there's any point in doing anything sensible in an  
OutOfMemory handler.

-- 
Best regards,
  Vladimir                            mailto:vladimir at thecybershadow.net


More information about the Digitalmars-d-announce mailing list