Array Size Problem

Login to reply to this topic.
Fri, 2008-03-21 13:13
Joined: 2008-03-21
Forum posts: 1

Hi friends,

I have a problem in creating a two dimensional array of size 1000 X 1000

i.e TInt Array1[1000][1000];

It works well in S60 2nd edition.

But in S60 3rd edition the application gets closed when this line gets executed.

I can able to declare array size of around [400][10] .etc.

Even this size problem comes for single dimensional array.

I can't trace out the problem. Please some one help me to solve this problem.


Fri, 2008-03-21 15:52
Joined: 2003-09-29
Forum posts: 32
Re: Array Size Problem

You are most probably running out of memory when allocating an array that is a little bit under 4 MB. There might be more heap available on the device, but allocation might not fit to the maximum heap size defined for the process. You can change this by using EPOCHEAPSIZE keyword in the exe's mmp-file:

EPOCHEAPSIZE 1048576 8388608

Previous example would define minimum heap size of 1 MB and maximum 8 MB. I think by default the maximum heap size is 1 MB.


Jari

Sat, 2008-03-22 11:24
Joined: 2005-12-07
Forum posts: 56
Re: Array Size Problem

1000*1000*4(size of TInt) = 4 MB
thats huge..... for a small tiny phone.. plz dont do that...
i think below link might help you ..
http://wiki.forum.nokia.com/index.php/Two_Dimensional_TInt_Array_in_Symbian

  • Login to reply to this topic.