[Gc] Changing ‘GC_should_collect’ to account for malloc’d memory
ludo at gnu.org
Tue Mar 1 14:26:44 PST 2011
"Boehm, Hans" <hans.boehm at hp.com> writes:
> Another approach might be to view the iconv_t structures as a second kind of
> resource that's managed by the collector. If user code keeps track of how
> many such structures are currently in use, it could decide that enough
> iconv_t structures have been allocated since the last GC to warrant a
> collection, independent of the GC heap situation.
That would be an option.
However, I’m concerned that choosing the number of iconv_t structures
that warrant a collection would be black art since developers may have
few clues to make a good decision, especially in the iconv_t example.
As a result, garbage collection could happen too frequently.
What do you think?
More information about the Gc