About the return address of shmat

Hi,

My server always coredump when restarted without clearing shm. When gdb into it, I found that a pointor saved in shm pointed to a wrong memory.
So I doubts that the value shmat returns does not remain the same when a process restart, 'cause the base virtual address of the process changes when retarted. Will anyone provide me a clear answear to this question? Thanks a lot!
You shouldn't put pointers in shared memory. Each process may map memory differently.
Topic archived. No new replies allowed.