summaryrefslogtreecommitdiff
path: root/allchblk.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 16:04:46 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 16:04:46 +0200
commitffa0c9ea38b3dd87e91b5ed2118c74002fed6782 (patch)
treef9003135a48276ce8396f87b485b607afbcfc09b /allchblk.c
parentf4549e6f616d1b976126e1afddde3fb15c88bb08 (diff)
gc6.4 tarball importgc6_4
Diffstat (limited to 'allchblk.c')
-rw-r--r--allchblk.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/allchblk.c b/allchblk.c
index 793c468..f9c31e0 100644
--- a/allchblk.c
+++ b/allchblk.c
@@ -590,8 +590,9 @@ int n;
GET_HDR(hbp, hhdr);
size_avail = hhdr->hb_sz;
if (size_avail < size_needed) continue;
- if (!GC_use_entire_heap
- && size_avail != size_needed
+ if (size_avail != size_needed
+ && !GC_use_entire_heap
+ && !GC_dont_gc
&& USED_HEAP_SIZE >= GC_requested_heapsize
&& !TRUE_INCREMENTAL && GC_should_collect()) {
# ifdef USE_MUNMAP
@@ -608,7 +609,8 @@ int n;
/* If we are deallocating lots of memory from */
/* finalizers, fail and collect sooner rather */
/* than later. */
- if (GC_finalizer_mem_freed > (GC_heapsize >> 4)) {
+ if (WORDS_TO_BYTES(GC_finalizer_mem_freed)
+ > (GC_heapsize >> 4)) {
continue;
}
# endif /* !USE_MUNMAP */
@@ -698,7 +700,7 @@ int n;
struct hblk * h;
struct hblk * prev = hhdr -> hb_prev;
- GC_words_wasted += total_size;
+ GC_words_wasted += BYTES_TO_WORDS(total_size);
GC_large_free_bytes -= total_size;
GC_remove_from_fl(hhdr, n);
for (h = hbp; h < limit; h++) {