On Jun 19, 2017, at 6:19 PM, Gregory Ewing <greg.ew...@canterbury.ac.nz> wrote:

> Ethan Furman wrote:
>> Let me ask a different question:  How much effort is required at the C level 
>> when using tracing garbage collection?
> 
> That depends on the details of the GC implementation, but often
> you end up swapping one form of boilerplate (maintaining ref
> counts) for another (such as making sure the GC system knows
> about all the temporary references you're using).
> 
> Some, such as the Bohm collector, try to figure it all out
> automagically, but they rely on non-portable tricks and aren't
> totally reliable.

Can you give examples of how it's not reliable?  I'm currently using it in one 
of my projects, so if it has problems, I need to know about them.

On the main topic: I think that a good tracing garbage collector would probably 
be a good idea.  I've been having a real headache binding python to my C 
library via ctypes, and a large part of that problem is that I've got two 
different garbage collectors (python and bdwgc).  I think I've got it worked 
out at this point, but it would have been convenient to get memory allocated 
from python's garbage collected heap on the C-side.  Lot fewer headaches.

Thanks,
Cem Karan
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to