How big is one element?  Even if it's 1 kB, that's still only 1 MB of stack space.