I am building an application with Diab compiler for PowerPC. I am having an issue with memory conflict.

In `header1.h` I have declared

```
...
void NullFunct_1 (int);
...

```

The function `NullFunct_1` is then defined in `main.c`

```
    #include "header1.h"
...
           void NullFunct_1 (int f)
           {
              return;
           }

```

In `header2.h` I have declared

```
    struct tp_key 
    {
        int a;                    
        void (*fn_ptr)(int);     // function pointer    
        unsigned int b;             
        unsigned int c;                
        int d;                  
        int e;                 
    };

```

In `header2.c` I initialize the array `Key` as follow

```
struct tp_key Key[48] = {0, &NullFunct_1, 0, 0, 0, 0};

```

In `header3.h` I declare the global variable `Units`

```
extern int Units;

```

In `header3.c` I define and initialize the variable `Units`

```
int Units = 0; //Units variable can then assume the values of 0, 1000 or 10000 only.

```

The program is compiled and linked without errors generating the executable.

The Link Editor Memory Map generated is the following

```
    input           virtual                        
    section         address     size     file
...
    .data           50036adc    00000484 header2.o
           Key      50036adc    00000480
           Xxxx     50036f5c    00000004

    .data           50036f60    00000170 header3.o
           Units    50036f60    00000004
...
...
        NullFunct_1 500038b8    0000000c main.o
...

```

You may notice the variables `Key` and `Units` are memory "neighbors" `0x50036adc + 0x480 = 0x50036f5c`.

In some cases the variable `Units` contains value `1342191800` `(0x500038B8 in hex)` that corresponds to the memory address of the variable `Null_Funct_1`

This happens because of the instruction

```
struct tp_key Key[48] = {0, &NullFunct_1, 0, 0, 0, 0};

```

Is this a linker problem that did not calculate the memory size of the variable Key correctly? or did I make a mistake?
Even if there is a linker problem then may you suggest how to avoid such kind of problems, please?