[Gc] Bug fix for GC_allochblk

Ivan Maidanski ivmai at mail.ru
Sun Jan 18 11:14:22 PST 2009


The current algorithm of avoiding blocks splitting in case of USE_MUNMAP in GC_allochblk() may lead (under some rare circumstances) the situation when GC_alloc_large() (which calls GC_allochblk() and GC_collect_or_expand() in a loop) grows the heap to the limit and returns NULL (because GC_allochblk() tries only an exact match). This situation may arise only (but I'm not exactly sure for this) in the generational (not "true" incremental) mode.

So, I suggest a small patch for GC_allochblk(). (May be, someone else suggests a better strategy of choosing "split_limit" value, or suggests some other solution).


More information about the Gc mailing list