Altera_Forum
Honored Contributor
10 years agomalloc problem
Hello
I am using Quarts and Nios 9.1 versions. In my board I have external (altmemddr) and on-chip (inside Cyclone III) memory. In the system library properties all memory (including rwdata, heap and stack) is defined to use an on-chip memory. But in my applicaion I am tring to allocate part of the variables to the ddr: EXTERN unsigned char *CisSheetQueue __attribute__ ((section(".altmemddr.rwdata"))); // Locate this array in DDR Later on I am trying to allocate 64K of this memory: CisSheetQueue = malloc(CIS_SHEET_QUEUE*sizeof(unsigned char)); But this size is not allocated and limited only to ~6K. During the compilation of nios there is an info message 16Kbytes free for stack + heap. How I can use and allocate a large size (64K) speciphically in DDR? Thank you for the help.