The first gets allocated in the "stack" (the area usually used for local variables), and the second gets allocated in the "heap" area for dynamically allocated memory.
You do not have enough stack space to allocate in the first place, your heap is big.
This discussion of SO can be useful: What and where are the stack and heap? .
When you allocate memory dynamically, you can always check the success or failure of allocation by examining the return value of malloc / calloc / etc .. unfortunately, such a mechanism does not exist for the memory allocation mechanism on the stack.
Also: you might like to read this in the context of this question, especially this part :)
Levon source share