It's not expected we will work with such large arrays anytime soon, but better be safe than sorry. Also, limit the number of elements to 2^31-1 to prevent infinite loop in the calculation of allocated elements.