diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2017-08-20 11:06:17 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2017-08-20 11:06:17 +0000 |
commit | e05eb9bea441d53356f1bee5c05cd360a1e1d1bf (patch) | |
tree | fdd9d734c540c3fea1f6ce563302fbe711ae2f24 | |
parent | 966c819687e505a05980fa1fd39c79a733d96ee5 (diff) |
two MALLOC_STATS only tweaks; one from David CARLIER, the other found by clang
-rw-r--r-- | lib/libc/stdlib/malloc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 22f83f35252..c7ef59b6800 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.228 2017/07/10 09:44:16 otto Exp $ */ +/* $OpenBSD: malloc.c,v 1.229 2017/08/20 11:06:16 otto Exp $ */ /* * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> @@ -293,12 +293,8 @@ wrterror(struct dir_info *d, char *msg, ...) writev(STDERR_FILENO, iov, 3); #ifdef MALLOC_STATS - if (mopts.malloc_stats) { - int i; - - for (i = 0; i < _MALLOC_MUTEXES; i++) - malloc_dump(STDERR_FILENO, i, mopts.malloc_pool[i]); - } + if (mopts.malloc_stats) + malloc_gdump(STDERR_FILENO); #endif /* MALLOC_STATS */ errno = saved_errno; @@ -2080,7 +2076,7 @@ err: #ifdef MALLOC_STATS struct malloc_leak { - void (*f)(); + void *f; size_t total_size; int count; }; |