From: "A.Appleyard" Organization: Materials Science Centre To: DJGPP AT delorie DOT com Date: Mon, 8 Jul 1996 12:49:03 GMT Subject: What if I run out of store? Message-ID: <19C7E4A0FB5@fs2.mt.umist.ac.uk> Excuse me if this query is rather faqqish, but, since in version 2 I am not allowed indefinite heap size:- (1) In (a) version 1, (b) in version 2, (c) in C and C++ in general including non-Gnu compilers, what happens if I call `new ', or malloc(), and there is not enough space available, what happens? I used to think that it merely returns 0, but after finding this function in c:\djgpp\libsrc\gcc\src\libgcc2.c_:- void _default_new_handler(){write(2,MESSAGE,sizeof(MESSAGE)); _exit(-1);} I no longer feel so certain. (2) How can I trap the error condition of the stack running out of space? Please reply to me in person, as I had to unsubscribe from djgpp email group due to email intray overload.