aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/allchblk.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2002-02-12 04:37:57 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2002-02-12 04:37:57 +0000
commit79f777fd1e10435cb50c4b45a664bd6ae280f2c1 (patch)
treecef3197531d988920cbff060bdc10742baf06d01 /boehm-gc/allchblk.c
parent005326029f35b4271c5274114a17126039fe18a0 (diff)
downloadgcc-79f777fd1e10435cb50c4b45a664bd6ae280f2c1.zip
gcc-79f777fd1e10435cb50c4b45a664bd6ae280f2c1.tar.gz
gcc-79f777fd1e10435cb50c4b45a664bd6ae280f2c1.tar.bz2
Imported GC 6.1 Alpha 3. Finally.
From-SVN: r49698
Diffstat (limited to 'boehm-gc/allchblk.c')
-rw-r--r--boehm-gc/allchblk.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/boehm-gc/allchblk.c b/boehm-gc/allchblk.c
index 06582ec..3da58c4 100644
--- a/boehm-gc/allchblk.c
+++ b/boehm-gc/allchblk.c
@@ -86,7 +86,6 @@ word blocks_needed;
}
-# define HBLK_IS_FREE(hdr) ((hdr) -> hb_map == GC_invalid_map)
# define PHDR(hhdr) HDR(hhdr -> hb_prev)
# define NHDR(hhdr) HDR(hhdr -> hb_next)
@@ -719,9 +718,6 @@ int n;
if (0 == hbp) return 0;
- /* Notify virtual dirty bit implementation that we are about to write. */
- GC_write_hint(hbp);
-
/* Add it to map of valid blocks */
if (!GC_install_counts(hbp, (word)size_needed)) return(0);
/* This leaks memory under very rare conditions. */
@@ -731,6 +727,11 @@ int n;
GC_remove_counts(hbp, (word)size_needed);
return(0); /* ditto */
}
+
+ /* Notify virtual dirty bit implementation that we are about to write. */
+ /* Ensure that pointerfree objects are not protected if it's avoidable. */
+ GC_remove_protection(hbp, divHBLKSZ(size_needed),
+ (hhdr -> hb_descr == 0) /* pointer-free */);
/* We just successfully allocated a block. Restart count of */
/* consecutive failures. */