Subj : Re: Function pointers in shm shared memory ? To : comp.programming.threads From : Kamal R. Prasad Date : Sat May 07 2005 01:51 am >So it is not possible to call my brigde functions >from the clients ? Can you explain why ? The function pointer which is in the shared memory segment has to point to an address in your process address space. You cannot jump to the text segment of another process -which is what you intend to do. The process virtual address space is unqiue to every process and (*fn)() would contain the virtual address of the other process. If you don't have the mapping, you cannot possibly access the function text. > because my server process cannot exist in multiple >instances, as in fact it is a process using OpenGl to >draw things.. The shared library text segment will exist as one instance only. Every process that is linked to it will have its own per-process data segment containing the shared library data. If you want just one copy of the text segment, it is possible to do so even for the server. by setting bits on the executable. Im not sure why more than 1 data segment will have a bearing on OpenGL. Even if it did, just hoist the data into a shared memory region -and you have what you wanted. Locking is something you would have to live with -if there are multiple threads of execution. regards -kamal .