Windows- 'C' Turbo C, "ARRAY SIZE TOO LARGE"

Discussion in 'C' started by santmaurya, Apr 1, 2009.

  1. santmaurya

    santmaurya New Member

    Joined:
    Apr 1, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    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 ?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    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 ?
     
  3. santmaurya

    santmaurya New Member

    Joined:
    Apr 1, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    The COMPILER IS ..

    Turbo C++, Version 3.0
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    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
     
  5. santmaurya

    santmaurya New Member

    Joined:
    Apr 1, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0

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

    listendinesh New Member

    Joined:
    Aug 3, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    You need to change the compiler
     
  8. santmaurya

    santmaurya New Member

    Joined:
    Apr 1, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0


    ok..
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice