diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 15:31:21 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 15:31:21 +0400 |
commit | e955362cfcef47fdc3ad2140f50ea4638fd86a4d (patch) | |
tree | 07b9d240b8bc1a7be60cc79c1ce1e43866e2b4a7 /mallocx.c | |
parent | c63ec8250de446bca83601966c918d37ad120a83 (diff) | |
download | bdwgc-e955362cfcef47fdc3ad2140f50ea4638fd86a4d.tar.gz |
gc5.0alpha3 tarball importgc5_0alpha3
Diffstat (limited to 'mallocx.c')
-rw-r--r-- | mallocx.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 { |