| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| X-MimeOLE: | Produced By Microsoft Exchange V6.0.6249.0 |
| content-class: | urn:content-classes:message |
| MIME-Version: | 1.0 |
| Subject: | RE: Trouble of using very large arrays |
| Date: | Thu, 22 Apr 2004 17:21:39 -0400 |
| Message-ID: | <ACAAE6BD7520AB4CB2744D1D1BAD3A2BA1424A@jupiter.insideai.com> |
| X-MS-Has-Attach: | |
| X-MS-TNEF-Correlator: | |
| Thread-Topic: | Trouble of using very large arrays |
| Thread-Index: | AcQor8rHn1S2NxtLTEq7aE76sMGMjQ== |
| From: | "John Bond" <Jbond AT ai-logix DOT com> |
| To: | <djgpp AT delorie DOT com> |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id i3MLLlJl026550 |
| Reply-To: | djgpp AT delorie DOT com |
******M. K. Shen wrote: I have difficulty in using very large arrays. In a simple program I could have 'unsigned int a[70000][2]' without problem but with 'unsigned int a[80000][2]' the program aborts without even the code being changed to access the increased new part of the array. Why is this so? Thanks in advance. ****** Looks like you over-ran your stack. Look at FAQ 6.6 to expand the stack with the global _stklen. When I had this problem, I added the line: unsigned _stklen = 1048576; /* need a 1MB stack */ to double the stack size. If you know your local variable size needed (in bytes), this is useful. Otherwise use the heap. -JBond, jbond_at_ai-logix.com (replace _at_ with @)
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |