Connecting Tech Pros Worldwide Forums | Help | Site Map

How can I know the size of system stack?

fadics
Guest
 
Posts: n/a
#1: Jul 22 '05
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.

--




John Harrison
Guest
 
Posts: n/a
#2: Jul 22 '05

re: How can I know the size of system stack?



"fadics" <fadics@sohu.com> wrote in message
news:cd821e$2134$1@mail.cn99.com...[color=blue]
> I wrote a program with recursion to sort some data. When the number of[/color]
data[color=blue]
> 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.
>[/color]

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


Sharad Kala
Guest
 
Posts: n/a
#3: Jul 22 '05

re: How can I know the size of system stack?



"fadics" <fadics@sohu.com> wrote in message
news:cd821e$2134$1@mail.cn99.com...[color=blue]
> I wrote a program with recursion to sort some data. When the number of[/color]
data[color=blue]
> is too large, there will be a error, stack overflow.
>
> How can I do? And how can I know the size of system stack?[/color]

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


fadics
Guest
 
Posts: n/a
#4: Jul 22 '05

re: How can I know the size of system stack?



"fadics" <fadics@sohu.com> дÈëÓʼþ news:cd821e$2134$1@mail.cn99.com...[color=blue]
> I wrote a program with recursion to sort some data. When the number of[/color]
data[color=blue]
> 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.
>
> --
>
>
>[/color]

Thank you.


Closed Thread


Similar C / C++ bytes