The largest array you can allocate is 2^31 - 1, much smaller than 10e9.

What is it your algorithm is trying to do? It is possible that accomplishing such a task via brute strength simply isn't...