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
This commit is contained in:
Craig Rodrigues 2013-11-29 08:04:45 +00:00
parent 1a707877c1
commit a3845534a0

View File

@ -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);