=================================================================== RCS file: /home/cvs/OpenXM_contrib/gc/Attic/malloc.c,v retrieving revision 1.1 retrieving revision 1.1.1.3 diff -u -p -r1.1 -r1.1.1.3 --- OpenXM_contrib/gc/Attic/malloc.c 1999/11/27 10:58:32 1.1 +++ OpenXM_contrib/gc/Attic/malloc.c 2000/12/01 14:48:25 1.1.1.3 @@ -81,6 +81,10 @@ register ptr_t *opp; /* but that's benign. */ /* Volatile declarations may need to be added */ /* to prevent the compiler from breaking things.*/ + /* If we only execute the second of the */ + /* following assignments, we lose the free */ + /* list, but that should still be OK, at least */ + /* for garbage collected memory. */ *opp = obj_link(op); obj_link(op) = 0; } else { @@ -93,8 +97,16 @@ register ptr_t *opp; if(GC_incremental && !GC_dont_gc) GC_collect_a_little_inner((int)n_blocks); lw = ROUNDED_UP_WORDS(lb); - while ((h = GC_allochblk(lw, k, 0)) == 0 - && GC_collect_or_expand(n_blocks, FALSE)); + h = GC_allochblk(lw, k, 0); +# ifdef USE_MUNMAP + if (0 == h) { + GC_merge_unmapped(); + h = GC_allochblk(lw, k, 0); + } +# endif + while (0 == h && GC_collect_or_expand(n_blocks, FALSE)) { + h = GC_allochblk(lw, k, 0); + } if (h == 0) { op = 0; } else {