#define MAX_KEY_SIZE 64
#define MAX_VALUE_SIZE 256

typedef struct {
    MPI_Aint disp;              /* Displacement in window */
    int      rank;              /* Rank (process) */
    void     *local_pointer;    /* Local address of data pointed
                                   at (if data local) */
    } RemotePointer;
typedef struct {
    RemotePointer next;
    /* For simplicity, we make the key and value stay within the
       structure.  In a more general case, they too could use
       RemotePointer */
    char          key[MAX_KEY_SIZE],
                  value[MAX_VALUE_SIZE];
    } ListElm;

/* The head starts on process 0 at an unknown displacement */
extern MPI_Win      listmutex;
extern MPI_Datatype listelmType, dptrType;
extern RemotePointer nullDptr;
extern int MPE_LISTWIN_KEY_RANK;

#define DispInListElm( _dptr, _field ) \
        (MPI_Aint)&(((ListElm *)((_dptr).disp))->_field)