Firstly, globals are bad, bad, bad. Secondly, you need to alocate that memory on the heap and not on the stack. Stacks tend to be about 16 kiB AFAIK; so you can't push 4 million bytes onto it.
I don't see why declaring the array as a global should help you. It doesn't make any sense.