Hi! Andy Wingo <wi...@pobox.com> skribis:
> I still this this is a good idea. The key would be to GC more often > when the heap image grows faster than GC'd memory is allocated. We can > detect this situation by computing (ImageSize_t+1 - ImageSize_t) / > (LiveBytes_t+1 - LiveBytes_t), where ImageSize is some measure of the > total process size, perhaps via getrusage(), and LiveBytes is > GC_get_heap_size() - GC_get_free_bytes(). The problem is that this measurement doesn’t allow us to differentiate between a growing heap with objects that may be freed as a result of running the GC, and a growing heap just because the application needs more malloc’d objects. (I think this is the argument that was made against my __malloc_hook patch back then. [0]) A longer term option may be to augment libgc with something akin to our old scm_gc_register_collectable_memory. WDYT? Thanks, Ludo’. [0] http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/4371