gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > DLDI driver stack usage

#142652 - ingramb - Thu Oct 11, 2007 6:35 am

This is related to my topic on stack overflow, but I think it deserves it's own topic.

I looked at the source code to the ninjapass x9 dldi driver, and it's allocating over 4kb worth of local variables. This is crazy...I don't want to waste that much valuable tcm on the dldi driver, and I have to wonder: do any other drivers use any more?

So that's the question. Is the ninjapass x9 driver a fluke? Does anyone have any sense of how much stack needs to be reserved for dldi drivers in general? I can modify the ninjapass driver myself if it's an isolated incident, but I can't change them all.

#142656 - chishm - Thu Oct 11, 2007 8:21 am

All the drivers I've written or modified shouldn't use more than around 1/2KB of stack. Normally they use a lot less, just enough for loop variables.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com