[Gc] Bug fix for GC_allochblk - the patch

Ivan Maidanski ivmai at mail.ru
Sun Jan 18 11:32:30 PST 2009


Sorry, I forgot to attach the patch itself.
Here is it.

Bye.
-------------- next part --------------
diff -ru bdwgc/allchblk.c updated/bdwgc/allchblk.c
--- bdwgc/allchblk.c	2008-11-23 19:08:54.000000000 +0300
+++ updated/bdwgc/allchblk.c	2009-01-18 18:17:00.016563000 +0300
@@ -596,6 +596,11 @@
 #     ifdef USE_MUNMAP
 	/* avoid splitting, since that might require remapping */
 	split_limit = 0;
+
+	/* Don't avoid splitting in case of generational mode since	*/
+	/* there may be no exact match even after heap expansion.	*/
+	if (GC_incremental && GC_finalizer_bytes_freed <= (GC_heapsize >> 4))
+	  split_limit = N_HBLK_FLS;
 #     else
 	if (GC_finalizer_bytes_freed > (GC_heapsize >> 4))  {
 	  /* If we are deallocating lots of memory from		*/


More information about the Gc mailing list