Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE" (http://www.go4expert.com/forums/windows-c-turbo-c-array-size-t16747/)

santmaurya 1Apr2009 09:13

Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"
 
I would like to define the two dimensional array of approximately size 60000 x 13. But our compiler gives the error "Array size too large" . It allows me to have the dimensions of about 5200 x 12 only. So I want to know, is there any limitation for array size ?? If yes what is it ?? and how can I accomodate my aforesaid data ?

shabbir 1Apr2009 09:42

Re: Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"
 
The limitation is not on the size of the array but the memory that your program can use at a time.

Whats the compiler you are using ?

santmaurya 3Apr2009 06:55

Re: Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"
 
Quote:

Originally Posted by shabbir (Post 45125)
The limitation is not on the size of the array but the memory that your program can use at a time.

Whats the compiler you are using ?

The COMPILER IS ..

Turbo C++, Version 3.0

shabbir 3Apr2009 08:57

Re: Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"
 
I guesses it. This is the problem with the limitation of the memory your compiler can allocate as it does not have the idea of virtual memory

santmaurya 3Apr2009 13:17

Re: Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"
 
Quote:

Originally Posted by shabbir (Post 45244)
I guesses it. This is the problem with the limitation of the memory your compiler can allocate as it does not have the idea of virtual memory


Sir,
Then, how can rectify this problem? Meaning, how can force the compiler to allocate appropriate memory ??

listendinesh 3Apr2009 14:28

Re: Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"
 
Are you using run time memory allocation means heap memory?

If not try malloc/calloc for run time memory allocation, If problem is stil there try to find the compiler flag to increase the heap size.

shabbir 3Apr2009 16:31

Re: Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"
 
Quote:

Originally Posted by santmaurya (Post 45263)
Sir,
Then, how can rectify this problem? Meaning, how can force the compiler to allocate appropriate memory ??

You need to change the compiler

santmaurya 3Apr2009 21:39

Re: Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"
 
Quote:

Originally Posted by shabbir (Post 45274)
You need to change the compiler



ok..


All times are GMT +5.5. The time now is 22:44.