Hi,
I am using a C6748 DSP and I don't have enough memory while using my code with a lot of functions.
I have a memory error when using this function to create arrays:
char *SngAlloc(int n, size_t sz)
{
char *c;
if ((c = (char *)calloc(n, sz)) == NULL)
printf("[SngAlloc] Not enough memory\n");
return c;
}
and my memory sections are:
SECTIONS
{
.text > L3_CBA_RAM ( shared RAM)
.switch > L3_CBA_RAM
.data > L3_CBA_RAM
.cinit > L3_CBA_RAM
.pinit > L3_CBA_RAM
.bss > L3_CBA_RAM
.far > DDR
.const > L3_CBA_RAM
.printf > L3_CBA_RAM
.cio > L3_CBA_RAM
.sysmem > L3_CBA_RAM
.stack > L3_CBA_RAM
}
I tried to change these sections but still don't work, I don't know where(in which section) calloc variables are created and how can I optimise it. Thank you
|