shmat() with fixed address

Hi,
I'm using Ubuntu 10.04 on a 64bit machine.

In my shmat() call, I want to assign fixed memory address to shmaddr variable. I have no idea which address value to give. Some where in the net I read we can make use of sysproc info to know the user space addresses, but could not figure out how to get that, please help on this.
void *shmat(int shmid, const void *shmaddr, int shmflg);

Note:
-----
the reason I want to use fixed address is to build linked list on the shmget() returned memory and my other process will map into fixed address and access the linked list.

The problem is that a valid address running one process may not be valid/available in another. In fact, an address that may be valid on one system may not be valid on another system. That's why it is recommended to use an automatic address assignment.

If all of the communicating processes are the same and fork from one program, you can use shmat() before forking and each process will automatically have the memory segment at the same address.

Otherwise, the best course of action is to not use absolute pointers but instead use some for of relative pointer: for example, an integer offset from the base of the segment. Unfortunately, this requires a bit of code to dereference these "pointers".