Can any one tell me how to allow applications using a dll to share a single
instance of a variable inside the dll.
>Can any one tell me how to allow applications using a dll to share a single
>instance of a variable inside the dll.
What you seem to be asking about is how to share memory between applications.
That is done using system calls like shmget and shmat for the System V style
shared memory, or using mmap.
But consider using some IPC mechanism like sockets instead.
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.
I created an executable that loads a shared library via dlopen().
The main program and the shared library use an identical object file
at link time. I expect the address of a particular variable to be
different at runtime, but I notice that the variable is actually identical
What needs to be done in order for the variable to have
2 separate addresses. Is it a link issue ? Is it an different option
in dlopen() ? I am using the standard C++ compiler (xlC_r) and
This behavior appears also under HP-UX, Linux and Solaris.
Thanks for your help.
2. X vs iBooks