diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-05-17 01:55:02 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-05-17 01:55:02 -0400 |
commit | 11b9c839f0c04c943a1e5f587dafb704e068b1aa (patch) | |
tree | f420e4116bf5ed5055949b9b2af9dc257c24b3ad /src/common/util.c | |
parent | c28d25e7a4fb9e00510d81ab38d9813b61a87ef5 (diff) | |
download | tor-11b9c839f0c04c943a1e5f587dafb704e068b1aa.tar.gz tor-11b9c839f0c04c943a1e5f587dafb704e068b1aa.zip |
Stop using malloc_usable_size(): valgrind hates it.
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c index d153df8cf1..13c55b2888 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -258,7 +258,9 @@ _tor_malloc_roundup(size_t *sizep DMALLOC_PARAMS) #ifdef HAVE_MALLOC_GOOD_SIZE *sizep = malloc_good_size(*sizep); return _tor_malloc(*sizep DMALLOC_FN_ARGS); -#elif defined(HAVE_MALLOC_USABLE_SIZE) && !defined(USE_DMALLOC) +#elif 0 && defined(HAVE_MALLOC_USABLE_SIZE) && !defined(USE_DMALLOC) + /* Never use malloc_usable_size(); it makes valgrind really unhappy, + * and doesn't win much in terms of usable space where it exists. */ void *result = _tor_malloc(*sizep DMALLOC_FN_ARGS); *sizep = malloc_usable_size(result); return result; |