diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-01-12 15:25:43 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-01-12 15:25:43 +0000 |
commit | 081f0508f2c26af97b857df77280f5d5c6ebf7b8 (patch) | |
tree | 70d23ebcfff3f036051bd21d0b8a6c5fed270378 /malloc | |
parent | a714d78077b209cdafe063296e53f1b60fb96038 (diff) | |
download | glibc-081f0508f2c26af97b857df77280f5d5c6ebf7b8.tar.gz glibc-081f0508f2c26af97b857df77280f5d5c6ebf7b8.tar.xz glibc-081f0508f2c26af97b857df77280f5d5c6ebf7b8.zip |
* malloc/memusage.c (dest): Reset not_me back to false after
printing statistics.
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/memusage.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/malloc/memusage.c b/malloc/memusage.c index 8b37c43a8a..b5077ffe0b 100644 --- a/malloc/memusage.c +++ b/malloc/memusage.c @@ -1,5 +1,5 @@ /* Profile heap and stack memory usage of running program. - Copyright (C) 1998-2002, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -887,4 +887,10 @@ dest (void) fputc ('=', stderr); fputs ("\e[0;0m\n", stderr); } + + /* Any following malloc/free etc. calls should generate statistics again, + because otherwise freeing something that has been malloced before + this destructor (including struct header in front of it) wouldn't + be properly freed. */ + not_me = false; } |