Re: Array size limits
"Wei Li" <liwei_guard-pub@yahoo.com> writes:[color=blue]
> I don't know how ANSI C says. But the stacksize of a program in runtime is
> limited by Opterating System. So that C compiler always doesn't give out an
> compile time error.
>
> If you are on Linux, you can use "limit" command to show the limits and use
> "limit stacksize 1000000" to change them. I think your program will work OK
>
> "Carol Depore" <nobody@nowhere .com> wrote in message
> news:lmn7j09msk s2q00nihpps23sn o0olk1hl6@4ax.c om...[color=green]
> > How do I determine the maximum array size?
> >
> > For example, int a[10000] works, but a[10000000] does not (run time
> > error).
> >
> > Thank you.[/color][/color]
Wei Li: Please don't top-post.
Top-posting means writing your new material first, followed by the
quoted article to which you're responding. It makes it difficult to
follow the discussion, especially when (almost) everyone else
bottom-posts, as I'm doing there. (You should also trim anything
that's not relevant to your response, though in this case the previous
article was short enough that quoting the whole thing is probably ok.)
Thanks.
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
"Wei Li" <liwei_guard-pub@yahoo.com> writes:[color=blue]
> I don't know how ANSI C says. But the stacksize of a program in runtime is
> limited by Opterating System. So that C compiler always doesn't give out an
> compile time error.
>
> If you are on Linux, you can use "limit" command to show the limits and use
> "limit stacksize 1000000" to change them. I think your program will work OK
>
> "Carol Depore" <nobody@nowhere .com> wrote in message
> news:lmn7j09msk s2q00nihpps23sn o0olk1hl6@4ax.c om...[color=green]
> > How do I determine the maximum array size?
> >
> > For example, int a[10000] works, but a[10000000] does not (run time
> > error).
> >
> > Thank you.[/color][/color]
Wei Li: Please don't top-post.
Top-posting means writing your new material first, followed by the
quoted article to which you're responding. It makes it difficult to
follow the discussion, especially when (almost) everyone else
bottom-posts, as I'm doing there. (You should also trim anything
that's not relevant to your response, though in this case the previous
article was short enough that quoting the whole thing is probably ok.)
Thanks.
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Comment