Building several dynamic libraries with one shared GC
frame
frame86 at live.com
Sun Sep 12 16:23:13 UTC 2021
On Sunday, 12 September 2021 at 14:31:04 UTC, NonNull wrote:
> If several plugins are built by different third parties, each
> dynamic library will have its own GC and copy of druntime right
> now. How can I organize that there is one separate dynamic
> library to share these among all plugins?
Shouldn't the runtime not already be shared on Linux? The
`Runtime.loadLibrary` specs say
`If the library contains a D runtime it will be integrated with
the current runtime.`
This should be true for the GC too. At least the memory is shared
because as I remember I could access __gshared variables,
whereas on Windows nothing like this works and any DLL will spawn
a new thread (for each thread you use too).
More information about the Digitalmars-d-learn
mailing list