diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-19 10:10:01 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-19 10:10:01 +0000 |
commit | a3e9d271353f431ddf2ff7c1cc0fbc9d59cd1951 (patch) | |
tree | fec69f60b37ca7ee4a47582f914dabbc7b3ee0c4 /boehm-gc/alloc.c | |
parent | f13bf5f6901b9992d51e08626a54684e3f87b065 (diff) | |
download | gcc-a3e9d271353f431ddf2ff7c1cc0fbc9d59cd1951.tar.gz |
Imported version version 5.0alpha6.
* acinclude.m4: Bump version to 5.0a6.
* configure.in: Don't use alpha_mach_dep.s.
* include/private/config.h, irix_threads.c gc_watcom.asm: Delete
obsolete files.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/alloc.c')
-rw-r--r-- | boehm-gc/alloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/boehm-gc/alloc.c b/boehm-gc/alloc.c index 3d0ddf05b36..7b923885b96 100644 --- a/boehm-gc/alloc.c +++ b/boehm-gc/alloc.c @@ -70,8 +70,6 @@ int GC_full_freq = 19; /* Every 20th collection is a full */ GC_bool GC_need_full_gc = FALSE; /* Need full GC do to heap growth. */ -#define USED_HEAP_SIZE (GC_heapsize - GC_large_free_bytes) - word GC_used_heap_size_after_full = 0; char * GC_copyright[] = @@ -655,7 +653,8 @@ word bytes; if (GC_n_heap_sects >= MAX_HEAP_SECTS) { ABORT("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS"); } - if (!GC_install_header(p)) { + phdr = GC_install_header(p); + if (0 == phdr) { /* This is extremely unlikely. Can't add it. This will */ /* almost certainly result in a 0 return from the allocator, */ /* which is entirely appropriate. */ @@ -665,7 +664,6 @@ word bytes; GC_heap_sects[GC_n_heap_sects].hs_bytes = bytes; GC_n_heap_sects++; words = BYTES_TO_WORDS(bytes - HDR_BYTES); - phdr = HDR(p); phdr -> hb_sz = words; phdr -> hb_map = (char *)1; /* A value != GC_invalid_map */ phdr -> hb_flags = 0; @@ -814,6 +812,7 @@ word n; LOCK(); if (!GC_is_initialized) GC_init_inner(); result = (int)GC_expand_hp_inner(divHBLKSZ((word)bytes)); + if (result) GC_requested_heapsize += bytes; UNLOCK(); ENABLE_SIGNALS(); return(result); @@ -827,7 +826,8 @@ GC_bool GC_collect_or_expand(needed_blocks, ignore_off_page) word needed_blocks; GC_bool ignore_off_page; { - if (!GC_incremental && !GC_dont_gc && GC_should_collect()) { + if (!GC_incremental && !GC_dont_gc && + (GC_dont_expand && GC_words_allocd > 0 || GC_should_collect())) { GC_notify_full_gc(); GC_gcollect_inner(); } else { |