GC vs. Manual Memory Management Real World Comparison

Rob T rob at ucora.com
Thu Oct 25 01:34:14 PDT 2012


On Thursday, 25 October 2012 at 02:15:41 UTC, Jakob Ovrum wrote:
>
> You can very much link to C and C++ code, or have C and C++ 
> code link to your D code, while still using the GC, you just 
> have to be careful when you send GC memory to external code.
>
> You can even share the same GC between dynamic libraries and 
> the host application  (if both are D and use GC, of course) 
> using the GC proxy system.

My understanding of dynamic linking and the runtime is based on 
this thread

http://www.digitalmars.com/d/archives/digitalmars/D/dynamic_library_building_and_loading_176983.html

The runtime is not compiled to be sharable, so you cannot link it 
to shared libs by defult. However, hacking the gdc build system 
allowed me to compile the runtime into a sharable state, and all 
seemed well.

However, based on the input from that thread, my understanding 
was that the GC would be unreliable at best.

I suppose I could do some tests on it, but tests can only confirm 
so much. I'd also have to decipher the runtime source code to see 
what the heck it is doing or not.

--rt


More information about the Digitalmars-d-announce mailing list