One of the wonderful "features" of System V IPC... Unless you explicitly delete segments they survive forever. Before the last program using the memory exits, make sure to call shmctl() with the IPC_RMID to remove the segment. You can actually call this immediately after the last app needing the memory attaches it and the memory automatically will be freed when all apps using it have exited or detached it. --------------------------- Eric Lemar elemar@cs.washington.edu http://www.cs.washington.edu/homes/elemar On Wed, 2 Aug 2000, Zhu Ming wrote: > HI, ALL, > > I met a problem in IPC program in linux. My program needs a lot of Shared > memory. Then after execution, the program cleanup these shared memory. But > if I run the program several times, some error in the results. It seems > the memory in UNIX needs to be recoverd. Do you know how to do that except > reboot? > > Yours > Zhu Ming > > - > : send the line "unsubscribe linux-net" in > the body of a message to majordomo@vger.rutgers.edu > - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.rutgers.edu