Originally posted by Jesper de Jong:
Shared libraries are always "independent" for different processes that use the same library.
Well... no, actually. That's generally the default, but it's not the only possibility. There's a specific compiler directive I remember from my distant past that tells LINK.EXE (Windows) to map specified data into a shared segment. If you do this in a DLL, that DLL's data is shared between processes. There may be a way to do this on some UNIX platforms, too.
Anyway, it would take some research, but
you should be able to find out how to build the DLL so that the memory would be shared.
Whether this is a good idea, or rather would leave your software as a smoking ruin of despair, is a question I shall leave up to you.