#include #include int main(){ char* x = NULL; unsigned long size = 1024; x = malloc(10); printf("long = %d\n", sizeof(unsigned long)); while(1){ x = realloc(x, size); if(x == NULL){ printf("size = %lu\n", size); fflush(stdout); break; } else{ x[size - 1] = 'a'; } size *= 2; } return 0; }