shmat() is returning a different “shmaddr” for same “shmkey”

后端 未结 3 735
-上瘾入骨i
-上瘾入骨i 2020-12-21 07:41

Here\'s my setup...

/* Bounded Buffer item structure */
struct item {
    int  id;  /* string index value */
    char str[80];  /* string value */
};

/* Str         


        
3条回答
  •  鱼传尺愫
    2020-12-21 08:09

    It's perfectly legal for the same shared memory segment to be mapped at different virtual addresses in different processes.

提交回复
热议问题