Can I allocate a 2D array of size [20000][20000] (roughly 1.5 GB) on the heap (by dynamic allocation) or as a global variable ?

```
// heap
int** dp = (int**)malloc(20000*sizeof(int*));
for(int i=0; i<20000; ++i) dp* = (int*)malloc(n*sizeof(int));
// global variable outside of main() function
int dp[20000][20000];
```

Can somebody please explain the bound of the memory avaliable on heap and global area?