Mail Archives: djgpp/1996/07/08/07:54:17
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 <typename>', 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.
- Raw text -