[PATCH 2a/1][BZ #12486] Remove assert in malloc statistic.
Ondřej Bílka
neleai@seznam.cz
Thu Oct 17 17:33:00 GMT 2013
A bug https://sourceware.org/bugzilla/show_bug.cgi?id=12486 is nearly
duplicate of 11087.
A bugzilla contains patch that adds locking around calculating maxima.
As these asserts are almost useless for finding memory corruption a
second possibility is to disable them.
Comments?
* malloc/malloc.c: remove checks for statistics.
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 2938234..1a18c3f 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2216,15 +2216,6 @@ static void do_check_malloc_state(mstate av)
/* top chunk is OK */
check_chunk(av, av->top);
- /* sanity checks for statistics */
-
- assert(mp_.n_mmaps <= mp_.max_n_mmaps);
-
- assert((unsigned long)(av->system_mem) <=
- (unsigned long)(av->max_system_mem));
-
- assert((unsigned long)(mp_.mmapped_mem) <=
- (unsigned long)(mp_.max_mmapped_mem));
}
#endif
More information about the Libc-alpha
mailing list