Re: [q-lang-users] Bug? New 'where' syntax
Brought to you by:
agraef
From: John C. <co...@cc...> - 2007-05-26 00:41:16
|
Albert Graef scripsit: > Someone (John?) came up with the idea of keeping track of a pointer to > an automatic variable. That might do the trick, but I'm not sure how > portable that is and how I can determine the available C stack size in > advance. Chicken has a small C program run at configuration time that figures out which way the C stack grows. Then it's just a matter of preserving the address of a local variable defined in main() in a global variable, then adding or subtracting the maximum stack size (defined at config time also; Chicken defaults to 128K) to it, and then occasionally comparing the content of that variable with the address of some local variable. -- In politics, obedience and support John Cowan <co...@cc...> are the same thing. --Hannah Arendt http://www.ccil.org/~cowan |