Why are stackoverflow errors chaotic?

后端 未结 7 878
醉话见心
醉话见心 2021-01-12 11:29

This simple C program rarely terminates at the same call depth:

#include 
#include 

void recursive(unsigned int rec);

int ma         


        
7条回答
  •  醉酒成梦
    2021-01-12 12:02

    You won't have the same behaviour between executions because it depends on the current memory available. The more memory you have available, the further you'll go in this recursive function.

提交回复
热议问题