Hi, I've define a large array( unsigned char array[1024*1024*50]; ), and this array is a global variable. In the program, I use memset function to set the values
unsigned char *src;
unsigned char value=0x11;
src=(unsigned char *)(&array[0]);
for(i=0;i<=9;i++)
{
memset(src,value,1024*1024*5);
src+=1024*1024*5;
value+=0x11;
}
when we debug the program, and the results are: while i=0 and 1, the values in the array[] has changes and are same with the value variable, besides, another address in the heap has changed also,and its values is same, too. while i=2,3,4,5, 8 and 9,the values are normal, and only the array[] has changed. however, i=6 and 7, we can watch the value in the array[] isn't the value we assigned. what causes that and how to solve that, besides, what's the maxium length of an array? thank you!
by the way, the version of ccs is ccs3.3, and BIOS's version is 5.31.02
another similar question has posted:http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/99/p/192944/690877.aspx#690877