What size is "TableSize", and how is the actual "Table T" declared - is it a local variable in a function or as a global variable? If it's a local variable then I'm not at all surprised you run out of stack [well, depending on TableSize and the compiler you are using will influence things too].
--
Mats

