Limited number of active methods?

I am currently working on a recursive program for processing data sets of various sizes.

The problem I find is that with my largest dataset (about 350,000 records), my program seems to end without providing any error information.

From testing, I think this could be due to recursion leaving too many incomplete methods open (approximate number is 72756). So my question is: does C ++ have a limit on the number of active methods, or am I looking at the wrong problem?

+3
source share
4 answers

++ . ++ , , , , .

, , , , , , .

+1

. .

, . / .

+1

, , . , , . , . 70 . , , . / , . , ( STL ), , . , new/malloc, , , , .

+1

, , , , , StackOverflow. , :)

, , , , , . , 72 . , , .

:

  • , CPU... , , .

  • , . gcc it -Wl,--stack,<bytes> ( ). gcc 8MiB , 16 32, .

  • ( , gcc 4.6) -fsplit-stack. , , , . , .

:

  • ( )

, .

+1
source

Source: https://habr.com/ru/post/1796676/