by using static, alts is on the heap and not on the stack.
plan 9 doesn't default to huge stacks, so this makes a difference.
also, alts is automatically zeroed because it's on the heap.

the only difference between

        void
        fu(void)
        {
                static Alt alts[NKALT+1];

                for(;;)
                        ;
        }

and
                
        static Alt alts[NKALT+1];

        void
        fu(void)
        {
                for(;;)
                        ;
        }

is that in the second example, alts is visible outside the function fu.

- erik

Reply via email to