04-26-07 06:18 AM
On Apr 25, 6:27 pm, sam_...@yahoo.co.in wrote:
> Hi Everyone,
>
> We all know that when the stack segment overflows, we get a error
> saying stack overflow and the program terminates. A main() calling
> itself recursivley results in this,
>
> What happens when the heap segment overflows? when we keep on
> allocating dynamic memory in a loop...
>
> Thanks in advance!!!
I think the correct behavior is malloc() returns NULL.
[ Post a follow-up to this message ]
|