if you are using Nios IDE, do the following:
Window > open perspective > Nios C\C++
In the left had side, right click on your project folder.
then select System Library Properties
you should see the selection boxes for all your code and memory allocation on the right hand side.
All sections of your program can be moved to different memories
.text, .rodata, .rwdata, heap, and stack can all me moved around.
If you want to move certain functions to different sections in memory,
you will need to either use pragmas or manipulate your memory map.
I haven't done that in Nios, but the nios documentation does tell how I believe.
First you need to develop your code and see if it exceeds your onboard memory size first. It seems to me that Altera did a good job on selecting the right ammount of on board ram for a given fpga. Meaning the Ram/logic ratios are good.
You may not need to store any code in off chip ram.
good luck.