aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/allchblk.c
diff options
context:
space:
mode:
authorHans Boehm <Hans_Boehm@hp.com>2005-02-09 21:33:02 +0000
committerHans Boehm <hboehm@gcc.gnu.org>2005-02-09 21:33:02 +0000
commit328d1d4c1c902bfa35bfdb69d7b22afca3a68e14 (patch)
tree740a513131a2bfd49e69843a563d9ce978424f93 /boehm-gc/allchblk.c
parentdab80c81c6b7fc84a08f1d1d5745c6861c7082c9 (diff)
downloadgcc-328d1d4c1c902bfa35bfdb69d7b22afca3a68e14.zip
gcc-328d1d4c1c902bfa35bfdb69d7b22afca3a68e14.tar.gz
gcc-328d1d4c1c902bfa35bfdb69d7b22afca3a68e14.tar.bz2
allchblk.c (GC_allochblk_nth): Dont overlook available space if GC disabled...
* allchblk.c (GC_allochblk_nth): Dont overlook available space if GC disabled, correctly convert GC_finalizer_mem_freed to byte, total_size to words. * dyn_load.c (win32 GC_register_dynamic_libraries): Consider only MEM_IMAGE regions. * mach_dep.c (GC_with_callee_saves_pushed): separate into new function, and indent appropriately. * mark_rts.c (GC_approx_sp): Access stack. * pthread_stop_world.c: (GC_suspend_handler): Explicitly push callee-saves registers when appropriate. (GC_stop_world): Handle EINTR from sem_wait (sync with Mono GC). From-SVN: r94776
Diffstat (limited to 'boehm-gc/allchblk.c')
-rw-r--r--boehm-gc/allchblk.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/boehm-gc/allchblk.c b/boehm-gc/allchblk.c
index 793c468..f9c31e0 100644
--- a/boehm-gc/allchblk.c
+++ b/boehm-gc/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++) {