Forum Discussion
Altera_Forum
Honored Contributor
17 years agoThe simple answer is you can't be sure that memory is not being used. Now you could do some profiling to determine how much of the RAM is used by code and how big your stack is, etc. Not a good method.
If you want to make sure that you are accessing memory appropriately than simply allocate a chunk of memory by creating an array or using malloc or something like that. Then you don't need to worry about where in memory it is located. If you've specified in the IDE system library settings to use your DDR2 for Read-only, Read/write, stack and heap memory, then it will automatically be located in the DDR2. You can also use compiler directives to specify what section of memory you would like a global variable to be located in.