Why cannot I get 2 gigabytes from malloc? – Debian
Having this: #include <string.h> #include <stdio.h> #include <stdlib.h> #define GB (1<<30) #define N 10000L //number of virtual blocks(arrays) int main (void) { int *ar[N]; for(int i =0; i<N ; i++) { ar[i]=malloc(GB); //alloc virtually one GB if(!ar[i]){ printf("done at %in",i);…