Here\'s my setup...
/* Bounded Buffer item structure */
struct item {
int id; /* string index value */
char str[80]; /* string value */
};
/* Str
when a process calls shmat(), it will return the virtual address of the shared memory. virtual address is the memory location as seen by the current process. different process can map the shared memory to different virtual address in the process address space and hence different return values of shmat() call for different processes.
a nice pictorial description of what I just said above. http://poshmodule.sourceforge.net/posh/html/node3.html