Re: [Gc] Figured out my problem with finalization cycles.Usefulpatchattached.
ivmai at mail.ru
Fri Jun 5 10:05:51 PDT 2009
"Talbot, George" <Gtalbot at locuspharma.com> wrote:
> Hi Ivan,
> Thanks for continuing to look at the patch.
I've looked it thru again (briefly). Seems to be ok. Don't expect from me more as I'm not using this functionality (backtracing) in my project.
> OK. I fixed the indentation level. Also included in the patch is a fix to GC_print_backtrace() that will detect cycles and stop. I added a recursive function in place of the loop in GC_print_backtrace() which maintains a list of visited objects on the stack and searches at each recursion. Not that great (O(n^2)) but probably adequate for debugging.
> Let me know if this works for you. If so, would someone be able to commit this?
> It's current with CVS as of ~12:20 EST 6/5/2009.
> George T. Talbot
> gtalbot at locuspharma.com
> P.S. I had one other question: Can the atomic ops library be exposed when building the collector so that I could use it in my program?
GC, in most cases, only includes headers from it. This way you could use it right now. Otherwise, build it as a separate library (libatomics). I don't think it is good to export something else from GC that it uses internally.
More information about the Gc