tjhayko@THUNDER.LAKEHEADU.CA (04/02/91)
I remember hearing some time ago on the net that Matt Dillon had added something called 'dynamic stack allocation' (I think) to DICE. What does this mean? Does it mean that I don't have to worry about how much stack is allocated before the program runs? This would seem to be a MAJOR feature in the AmigaDOS world if that is what it is. Also, does DICE run under 2.0? ********************************************************** * Tom Hayko * Call The Amiga Showroom * * tjhayko@thunder.lakeheadu.ca * 807-344-7460 80MB online* * tjhayko@LAKEHEAD.BITNET * NOTE: I'm not the sysop * ********************************************************** QUIT
dillon@overload.Berkeley.CA.US (Matthew Dillon) (04/04/91)
In article <9104021413.AA10774@thunder.LakeheadU.Ca> tjhayko@THUNDER.LAKEHEADU.CA writes: > > >I remember hearing some time ago on the net that Matt Dillon had >added something called 'dynamic stack allocation' (I think) to >DICE. What does this mean? Does it mean that I don't have to >worry about how much stack is allocated before the program runs? >This would seem to be a MAJOR feature in the AmigaDOS world if >that is what it is. Also, does DICE run under 2.0? > >********************************************************** >* Tom Hayko * Call The Amiga Showroom * >* tjhayko@thunder.lakeheadu.ca * 807-344-7460 80MB online* >* tjhayko@LAKEHEAD.BITNET * NOTE: I'm not the sysop * >********************************************************** > >QUIT Yes, it's a new option that generates stack checking code and automatic allocation of a new stack if the current is getting too low. It's not perfected yet... for example, if you make a call in a tight loop that happens to be on the stack boundry, it allocates / deallocates the stack for the routine on every call (I need to add a one-level cache). Also, it is somewhat wasteful on memory.. to the order of 12% of all allocated stack space goes unused because it needs to leave enough room for possible DOS calls. BUT, it *does* work in an emergency situation (where you expect most of your program won't need the feature but one or two recursive routines might if given complex args, etc...) and you can selectivly enable the option on a procedure by procedure basis. DICE has worked under 2.0 for the last 5 months.. works better under 2.0 than under 1.3, in fact. -Matt -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA