
Hi, I was directed to recent traffic on the freebsd lists...
I suspect the memory leaks you're experiencing aren't freebsd-specific, nor are they necessarily the result of bugs in libgc proper -- one of the recurring issues we've been having has been large leaks due to the way we bridged the refcounted and garbage-collected portions of the codebase.
In a nutshell, some garbage-collected objects also have refcounts that can be used to pin them so they can be referenced by non-gc-aware objects.
Since these objects are still traced by the collector, and are generally organized in the form of trees with parent pointers, a single leaked refcount will pin the entire tree of objects.
[ It was one of those designs that seemed like a good idea at the time... ]
In a profound irony, pretty much all of the leaks of gc-managed memory we've discovered so far have been due to refcount leaks in conventional code. :/
I thought we had found and fixed them all, but they can be pernicious and hard to nail down; I am noticing that we are still a little leaky on other platforms as well. There may be issues with libgc on freebsd as well, but I would look at refcount leaks if you've not already done so.
Anyway, it sounds like you've been spending a good deal of time with debugging this; would you like to further compare notes in case we're duplicating effort?
-mental