diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2013-11-29 08:04:45 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2013-11-29 08:04:45 +0000 |
commit | cc89f06998d867df412dc89b5330d170dfa7dab6 (patch) | |
tree | 172f170bccfb360809b9af88860901eb97f7ef7f | |
parent | d895e55630a6db6b3f82360b4a392fbbfeb89f2b (diff) | |
download | FreeBSD-src-cc89f06998d867df412dc89b5330d170dfa7dab6.zip FreeBSD-src-cc89f06998d867df412dc89b5330d170dfa7dab6.tar.gz |
In keg_dtor(), print out the keg name in the "Freed UMA keg was not empty"
message printed to the console. This makes it easier to track down
the source of certain memory leaks.
Suggested by: adrian
-rw-r--r-- | sys/vm/uma_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 42f5b16..6030a15 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1689,8 +1689,9 @@ keg_dtor(void *arg, int size, void *udata) keg = (uma_keg_t)arg; KEG_LOCK(keg); if (keg->uk_free != 0) { - printf("Freed UMA keg was not empty (%d items). " + printf("Freed UMA keg (%s) was not empty (%d items). " " Lost %d pages of memory.\n", + keg->uk_name ? keg->uk_name : "", keg->uk_free, keg->uk_pages); } KEG_UNLOCK(keg); |