This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

for次数变多导致程序跑飞

Part Number: TMS320C5515

for(i=0;i<8192;i++) //容易导致死机的循环

{
as[i]=((sdata[i] & 0x800000) == 0x800000)?1:0;
if(as[i] == 1)
{
sdata[i] = ((~sdata[i])+1)&0x7FFFFF;
}
if(sdata[i] > temp)
temp = sdata[i];
}

在主循环中进行for循环,进行最大绝对值判断,当循环次数4096,可正常执行,当循环扩大到8192,程序会跑飞;但是另外一个8192次循环访问sdata数组就不会出现这种情况,是否有相似情况出现吗?