How can I know the size of system stack?

F

fadics

I wrote a program with recursion to sort some data. When the number of data
is too large, there will be a error, stack overflow.

How can I do? And how can I know the size of system stack?

Thank you.

--
 
J

John Harrison

fadics said:
I wrote a program with recursion to sort some data. When the number of data
is too large, there will be a error, stack overflow.

How can I do? And how can I know the size of system stack?

Thank you.

There is no standard C++ way to find out the size of the system stack.

You should ask this question again on a group that discusses your compiler.
There might be a way to find out the size of the stack that is specific to
your compiler. This groups welcome message suggests some groups that might
be a better place for your question. http://www.slack.net/~shiva/welcome.txt

john
 
S

Sharad Kala

fadics said:
I wrote a program with recursion to sort some data. When the number of data
is too large, there will be a error, stack overflow.

How can I do? And how can I know the size of system stack?

Standard C++ does not address issues like system stack. Check with your
compiler documentation if they provide any way.
 
F

fadics

fadics said:
I wrote a program with recursion to sort some data. When the number of data
is too large, there will be a error, stack overflow.

How can I do? And how can I know the size of system stack?

Thank you.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,477
Latest member
ColumbusMa

Latest Threads

Top