GC, memory leaks and 32/64 bit

Marco Leise Marco.Leise at gmx.de
Tue Mar 12 13:29:21 PDT 2013


Am Tue, 12 Mar 2013 21:08:01 +0100
schrieb "Rob T" <alanb at ucora.com>:

> It should be a plugin so that components like an alternate GC can 
> be swapped in and out easily. I hope once shared lib support 
> becomes available we'll finally see plugins introduced into dmd.
> 
> --rt

Well, you can already today set a proxy for the GC. This
mainly to disable a DLLs GC and make it foward everything to
the main executable's GC, but you can use for other purposes.
It just means an additional indirect function call for every
GC method call.
An alternative is to override all of the exported GC C
functions with your own implementations, so that the linker
will prefer the versions found in your code rather than the
ones in Phobos. But this doesn't allow swapping at runtime.

-- 
Marco



More information about the Digitalmars-d-learn mailing list