From 9bc8642e1f366a35c305b9abe9e01bf934b584b9 Mon Sep 17 00:00:00 2001 From: tromey Date: Mon, 1 Nov 1999 23:15:51 +0000 Subject: Merged GC 5.0alpha4 with local changes, plus: * Makefile.in: Rebuilt. * Makefile.am (gctest_LDADD): Added THREADLIB. (TESTS): New macro. * configure: Rebuilt. * configure.in (INCLUDES): New subst. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30332 138bc75d-0d04-0410-961f-82ee72b054a4 --- boehm-gc/mallocx.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'boehm-gc/mallocx.c') diff --git a/boehm-gc/mallocx.c b/boehm-gc/mallocx.c index ae8bfffb8af..8c07fa98846 100644 --- a/boehm-gc/mallocx.c +++ b/boehm-gc/mallocx.c @@ -57,8 +57,16 @@ register int k; 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, IGNORE_OFF_PAGE)) == 0 - && GC_collect_or_expand(n_blocks, TRUE)); + h = GC_allochblk(lw, k, IGNORE_OFF_PAGE); +# ifdef USE_MUNMAP + if (0 == h) { + GC_merge_unmapped(); + h = GC_allochblk(lw, k, IGNORE_OFF_PAGE); + } +# endif + while (0 == h && GC_collect_or_expand(n_blocks, TRUE)) { + h = GC_allochblk(lw, k, IGNORE_OFF_PAGE); + } if (h == 0) { op = 0; } else { @@ -130,7 +138,7 @@ void GC_incr_mem_freed(size_t n) ptr_t GC_generic_malloc_words_small(size_t lw, int k) #else ptr_t GC_generic_malloc_words_small(lw, k) - register size_t lw; + register word lw; register int k; #endif { @@ -148,7 +156,7 @@ DCL_LOCK_STATE; GC_init_inner(); } if (kind -> ok_reclaim_list != 0 || GC_alloc_reclaim_list(kind)) { - op = GC_clear_stack(GC_allocobj(lw, k)); + op = GC_clear_stack(GC_allocobj((word)lw, k)); } if (op == 0) { UNLOCK(); -- cgit v1.2.1