Path: chuka.playstation.co.uk!foo.mel.cybec.com.au!nobody From: Toby Hutton Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: GsDrawOT hanging... HELP! Date: 11 Sep 1999 15:55:21 +1000 Organization: PlayStation Net Yaroze (SCEE) Lines: 26 Sender: toby@foo.mel.cybec.com.au Message-ID: <86yaee801i.fsf@foo.mel.cybec.com.au> References: <7r92mn$mac4@chuka.playstation.co.uk> <86puzr4pxp.fsf@foo.mel.cybec.com.au> <7rbbu2$mac9@chuka.playstation.co.uk> NNTP-Posting-Host: 203.103.154.60 X-Newsreader: Gnus v5.6.45/XEmacs 21.1 - "20 Minutes to Nikko" "Matt Verran" writes: > Toby (or anyone else), > > Could you go into more detail about this? I did find once that making > some of my local variables into global ones stopped the hang. I also found > that making sure variables are specifically set to 0 helped. The same > problem keeps resurfaceing though. Should I change ALL my locals to static > types? what consequences will this have? I make *all* of my local structs and arrays static. If I have a lot of other local data then they're static too. Making local variables static (or global - not as elegant and harder read) means they reside in the main heap or data segment. Normally space for locals is created on the stack when a function is called and disappears when leaving the function. So the only real difference as far as your code goes is you have to keep in mind that your locals will remember their previous values from last call when they're static. This should be no problem as you should be initialising most variables before you use them anyway ;) The stack should have plenty of room on the Yaroze, but it doesn't seem to, I haven't bothered checking why. -- Toby.