Hello,
I'm very interested in having a shared memory mechanism similar
to Microsoft DLL in a UNIX environment. In DLL, not only the functions
are shared, but also the data space. Furthermore, the data space is
dynanmic, which means you can malloc/free some data object in one
program and another program can access this object from certain user-
implemented functions.
In UNIX, shared library can achieve the sharing of the PIC (position
independent code?) functions, but not the data space. All the global
variables are locally initialized in the process space. On the other
hand, mmap() or shmXXX functions can achieve the sharing of data space.
But the sharing there is static, meaning space is pre-allocated and
you can not do malloc/free in one process and having another access it
without duplication. There is no set of functions applicable to mmap()
or shmXXX functions to do allocation and deallocation.
I wonder if someone has any idea how to implement this DLL like
shared memory in UNIX. Any suggestion is greatly appreciated.
Fred Xia
--
// Xia, Zeqing Fred, Software Engineer |_____/ \/\
// Bridge Information Systems, Inc. |____/|_/\_\
// 717 Office Parkway, St. Louis, MO 63141 |___/_|_ _/