multiple framework instances in private memory spaces
multiple framework instances in private memory spaces
- Subject: multiple framework instances in private memory spaces
- From: jon klein <email@hidden>
- Date: Tue, 19 Jun 2007 09:29:58 -0400
Hey folks,
We've got a tricky situation involving plugins and linked
frameworks. We have multiple loadable bundle plugins for a host
application (which we did not write, and thus don't control the
source or compilation). These plugins share a fair amount of source
code and are also both linked against a framework (which we also
don't control source/compilation for).
The problem is that even though the plugins are loaded separately
into their own memory spaces, the linked framework that they both use
is shared between them in a single memory space. Because the linked
framework has some global state, our two plugins end up interfering
with each other.
If we were loading these modules ourselves (instead of the dynamic
linker doing it), I believe we could solve the problem by loading
multiple instances via RTLD_LOCAL as opposed to RTLD_GLOBAL. The
question is whether it's possible to get this behavior when the
dynamic linker is loading the framework.
Perhaps this relationship--like most--is best illustrated with some
ASCII art.
Currently, this is the behavior that is leading to unhappy plugins:
Host Application
/ \
/ \
Plugin A Plugin B
\ /
\ /
Framework
What we would like to happen is to have a private memory space for
multiple "instances" of the same framework:
Host Application
/ \
/ \
Plugin A Plugin B
| |
| |
Framework Framework
Thanks,
-- jon klein
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden