Go Down

Topic: How to use all 96kb RAM (Read 1 time) previous topic - next topic


I'm currently working with Arduino Mega with QuadRAM from ruggedcurcuits.com.
512kb of QuadRAM is too large for me but I require around 100kb of RAMS.

So,I'm planning to buy Due, but I'm not sure how to use banks.
Product page says,

"The available SRAM is 96 KB in two contiguous bank of 64 KB and 32 KB. "

but what exactly this means? can I use malloc for utilize full of 96kb? or should I use some technique to select bank?


Feb 04, 2013, 02:27 pm Last Edit: Feb 04, 2013, 02:31 pm by stimmer Reason: 1
You don't have to do anything - the compiler will do it all for you. The banks are contiguous in the memory map so large mallocs work, as well as declaring large arrays. You won't be able to malloc the whole 96Kb because Arduino uses some for itself. The largest I've practically needed so far was a 77Kb array char fb[240][320]; which worked with no problems at all. (You only need to worry about banks when dealing with very advanced DMA timing using multiple channels simultaneously)
Due VGA library - http://arduino.cc/forum/index.php/topic,150517.0.html



Thank you, well It's fine for me. I'll buy Due.

Go Up