Sharing memory between modules
Posted
by
John Holecek
on Stack Overflow
See other posts from Stack Overflow
or by John Holecek
Published on 2011-01-06T14:49:14Z
Indexed on
2011/01/06
14:54 UTC
Read the original article
Hit count: 167
Hi, I was wondering how to share some memory between different program modules - lets say, I have a main application (exe), and then some module (dll). They both link to the same static library. This static library will have some manager, that provides various services. What I would like to achieve, is to have this manager shared between all application modules, and to do this transparently during the library initialization. Between processes I could use shared memory, but I want this to be shared in the current process only. Could you think of some cross-platform way to do this? Possibly using boost libraries, if they provide some facilities to do this.
Only solution I can think of right now, is to use shared library of the respective OS, that all other modules will link to at runtime, and have the manager saved there.
© Stack Overflow or respective owner