#46917 - headspin - Sat Jul 02, 2005 1:36 am
Hi, currently I have a variable I use to store large sample data.
To save taking such a long time to send via wifime, I'd like to malloc it at run-time.
I use this code:
Then in main() I allocate memory (I've tried both these methods):
I assume they are essentially the same since new calls malloc, am I correct?
This is crashing my ROM using either of these methods. I should probably place it in external RAM, how can I do that using malloc/new?
I have tried replacing ds_arm9.ld from this thread, but still not working.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
Last edited by headspin on Sat Jul 02, 2005 5:46 pm; edited 1 time in total
Code: |
#define MAXSMP (44100*10)
short VAR_IN_EXRAM MemWav[MAXSMP]; |
To save taking such a long time to send via wifime, I'd like to malloc it at run-time.
I use this code:
Code: |
short *MemWav; |
Then in main() I allocate memory (I've tried both these methods):
Code: |
MemWav = new short[MAXSMP];
// or MemWav = (short *) malloc(MAXSMP); |
I assume they are essentially the same since new calls malloc, am I correct?
This is crashing my ROM using either of these methods. I should probably place it in external RAM, how can I do that using malloc/new?
I have tried replacing ds_arm9.ld from this thread, but still not working.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
Last edited by headspin on Sat Jul 02, 2005 5:46 pm; edited 1 time in total