How are variables mapped across to the various memories by the C compiler?

The compiler maintains the symbol table which has the related information of all the variable names along with the length of the allocated space, the access unit length for the pointer (type of pointer) and the starting address of the memory space.