You need a bigger stack, most likely. Better still, if you want to store that much data, use a linked list instead, which if written correctly should use the heap, which has far more space available. 5500*(100+10+100+10+100+4+8+15)=1.82MB, which is way too much to be trying to store on your stack.