Hello,
I am using CCSv2.1 and trying to compute FFT, I am using DSK5416 target and I have compiled and built the code successfully but the code is not working properly with calloc and malloc functions.It is not allocating memory required , I tried changing in .cdb configuration file the stack and heap size , I also entered heap size in build options/linker / heap size 0x0400 . I used arrays for allocating memory instead of calloc and malloc and code works fine for smal data.But my computation requires more data in next steps of code so i have to use calloc and malloc, i am not able to figure out where the problem lies and what changes i should make . This is the piece of code when executed gives "unable to allocate complex array" .
static complex *a, *b;
if (flag == 0) {
a = (complex *) malloc((nfft+1)*sizeof(complex));
b = (complex *) malloc((nfft+1)*sizeof(complex));
if ((a == NULL) || (b == NULL)) {
printf("unable to allocate complex array \n");
_exit(-1);
}
Regards,
Nikita.