#149845 - nipil - Fri Jan 25, 2008 11:10 pm
About dynamic memory allocation. I ran into a problem after a debugging session, as i forgot to change one line and the rom crashed in the emulator. It led to allocate 15K of local variables, while the stack is (afaik) 16k. I just thought i could use new/malloc instead of local variable. But i just asked myself where the memory would go... And i wondered if there would be enough room. I happen to remember that on a PC, there are a stack and a heap. stacks is for local variables and arguments, heap for dynamic alloc. Is there any heap on the DS, and which size does it have ? Thanks in advance.
PS: both "new" and "malloc" just works with 15k.I'd still be happy to get some explanation on how dynamic alloc this works on the DS ;)
PS: both "new" and "malloc" just works with 15k.I'd still be happy to get some explanation on how dynamic alloc this works on the DS ;)