call stack size and overflow?

26 views
Skip to first unread message

james cardona

unread,
Dec 2, 2013, 1:45:46 PM12/2/13
to fre...@googlegroups.com
Hi all,
I am wondering what happens if there are too many calls on the stack (or is supposed to happen)?

One of my modes is similar to LITZ in that there is an endless ball feed for about 60 seconds then flippers die and all balls drain.  In this endless feed process, I am relying on the callset_boolean (end_ball) from the trough device.  But since my code is pretty large now I have about 12 callset entrys that catch that call.  I think I am overloading/overflowing when this happens.

Sometimes everything works fine; other times the balls stop serving.  I am guessing that the call stack is getting overloaded with so many drains and endball calls in rapid succession.  When the balls stop serving pretty much the trough stops working altogether - it never resets.

I am considering rewriting this mechanism in the device code so that it is only one call and I move all the variables into device.c as extern (obviously this will only work for my code and kind of bastardizes freewpc but I have been doing that type of thing all along)

what my question for you all is this:  what's faster?  checking extern variables or callsets?  My gut tells me that the externs would be much faster (although the code is ugly).

by the way, if you haven't seen it, I posted a video this morning of what my DT/DM code looks like at the moment.
http://www.youtube.com/embed/xcJF_MhrAFE?autoplay=1&rel=0

jim
Reply all
Reply to author
Forward
0 new messages