#1673 - TrisOver - Tue Jan 21, 2003 2:12 pm
hi,
If my executable is 255ko and that I use in my code dynamic memory allocation (50 ko ...), can I Use MultiBoot solution ?
If the real limit of MultiBoot is effectively a 256Ko executable (and no memory or stack, how many maximum Dynamic Memory can I use ?
#1674 - ampz - Tue Jan 21, 2003 2:28 pm
Not sure what you are asking.
You can use the 256kB extRAM and the 32kB intRAM in multiboot mode.
#1675 - Quirky - Tue Jan 21, 2003 3:13 pm
If you use up all 256k on the multiboot executable, then there is no memory left for malloc (if using an unmodified devkitadvance set up) - does that answer your question?
#1677 - TrisOver - Tue Jan 21, 2003 3:25 pm
Sorry for my poor english ...
So,
- Executable is in ExtRAM (and is executed at this place)
- When I call the "alloc" function, memory is allowed in IntRAM (Work RAM)
I'm right ?
TrisOver
#1678 - TrisOver - Tue Jan 21, 2003 3:31 pm
OK, Quirky: I'm wrong
Can I put data in IntRam (WorkRam) ?
_________________
TrisOver
#1679 - Splam - Tue Jan 21, 2003 3:33 pm
You can also compress your graphics data and decompress it to vram then use the space where it was in ram. You need to code your own methods for this of course and it relys on all the gfx fitting in one go but you can even hold compressed data in there as a sort of swap buffer.
#1689 - Quirky - Tue Jan 21, 2003 4:51 pm
You can put your data in IWRAM, simply don't define it as const, but the problem is that it will still be defined in the ROM, which is sat in EWRAM, and copied accross to iwram at run time.
Or did you mean decompress to IWRAM? That's a bit trickier, I don't know how you could allocate a dynamic chunk of IWRAM using devkit advance. The cowboy method would be to have a global like "unsigned char big_array[2000];" and check with the linker's -Map flag that it is going into iwram where you want... but I can't think of a better way at the moment.