unsigned int *pagetables[i][1024] = (unsigned int*) 0x20e000;
Wont work, but:
The point is, I want to create this in a loop, but the compiler wont accept it. So, how can I declare that address ? ( Please don't tell me C lacks this feature [Does it?] )
unsigned int *pagetables[i][1024] = (unsigned int*) 0x20e000;
You're trying to allocate an array that already exists, now as an array of uint *'s, a two-dimensional at that, and you're assigning a single address to it in the wrong format.
As this is in the "General Programming" thread: Beware, what those two are fiddling with here is kernel-space code, i.e. it's more or less legal for them to work with memory that hasn't been malloc()ed before.
More or less.
Every good solution is obvious once you've found it.
I think the "placement new" is what you are looking for. However this is available in C++ (but the logic could be used in C).
Googling for "placement new" should get you a lot of info on this.
alternatively, declare your array as being "extern" and enforce its location by a symbol assignment in a linker script (e.g. the linker will place the stuff where you want it to be, and the compiler will keep using perfectly clean code).
That may make sense in embedded systems, somehow ...