Hi,
I am going to move a program in Visual C++ to eZdspf28335. I was testing memory allocation with ezdspf28335 and it seems that there are differences between standard C and the C in texas DSPs, I wanted to check about the following items:
1- sizeof return the size of a variable in 16 bits.
for example if we run int f=sizeof(int);
f would have 1 instead of 2.
1- I wrote a small piece of code
int *pp[32];
for(int i=0;i<32;i++)
{
pp[i]=(int *)malloc(512);
}
It seems when we write malloc(512), it allcates 512*16 bits.
Is this true? It is different from Ansi C standard.
2- I set the heap size to 4096
According to previous two itesm, it should mean 4096*2 Byts
3- It allocates memory in .econst memory section. Is this ok? (not in .esysmem section)
If the above is correct, is there any document about differences between C in texas DSPs and Standard C?
Thanks a lot,
Behzad