diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2004-01-26 14:59:40 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-01-26 14:59:40 -0800 |
commit | 242d8792161a2f70e0fe33fb7e2109ec86f2bb8a (patch) | |
tree | a68982864e864aa791163ab1ef221a65cd54d6c1 /gcc/ggc-common.c | |
parent | 6d4b0a5d5776e884d904d55fb4a893ebe42d4af0 (diff) | |
download | gcc-242d8792161a2f70e0fe33fb7e2109ec86f2bb8a.zip gcc-242d8792161a2f70e0fe33fb7e2109ec86f2bb8a.tar.gz gcc-242d8792161a2f70e0fe33fb7e2109ec86f2bb8a.tar.bz2 |
Revert accidental commit.
From-SVN: r76675
Diffstat (limited to 'gcc/ggc-common.c')
-rw-r--r-- | gcc/ggc-common.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index 6ec7db7..ecd6624 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -147,11 +147,6 @@ ggc_realloc (void *x, size_t size) return ggc_alloc (size); old_size = ggc_get_size (x); - -#ifndef ENABLE_GC_ALWAYS_COLLECT - /* In completely-anal-checking mode, never re-use memory. This maximizes - the chance of catching the user retaining a pointer to the old block. - Otherwise, we get to consume the power-of-two overhead we had before. */ if (size <= old_size) { /* Mark the unwanted memory as unaccessible. We also need to make @@ -169,7 +164,6 @@ ggc_realloc (void *x, size_t size) VALGRIND_DISCARD (VALGRIND_MAKE_READABLE (x, size)); return x; } -#endif r = ggc_alloc (size); @@ -182,7 +176,7 @@ ggc_realloc (void *x, size_t size) memcpy (r, x, old_size); /* The old object is not supposed to be used anymore. */ - ggc_free (x); + VALGRIND_DISCARD (VALGRIND_MAKE_NOACCESS (x, old_size)); return r; } |