How can a 2D array be re-shaped in runtime, in C? 
For example, we have initially declared a unsigned char array[20][500] and need later to re-shape it, to something like e.g. array[40][250]. The total memory consumption will (and must) always stay the same (10.000 bytes). 

The restrain is that the newly shaped array, must be on the exact memory space address - as initially was declared. We can't allocate a different space / we are not sure if there will be any free space to use (microprocessor project). 
I tried with calloc, but eventually it goes bananas:

```
unsigned char **my_array; //Global defined

void reshape(unsigned short max_cols, unsigned short max_rows){
    my_array = (unsigned char **) calloc(max_cols, sizeof(unsigned char*));
    for(i = 0; i < max_cols; ++i){
        my_array[i] = (unsigned char **) calloc(max_rows, sizeof(unsigned char));
    }
}

```

I am a newbie in C, so any help is appreciated - thanks!