An array of 2^32
elements is basically 4 GB * size of an element
, so there are high chances it will not fit into memory.
The error you are getting is exactly that: the allocator cannot allocate enough space. You might want to consider another solution than allocating a several gigabytes array. Having a little more detail about what you are trying to achieve could help putting you on the right track! :)