svn commit: r258737 - head/sys/vm

Craig Rodrigues rodrigc at FreeBSD.org
Fri Nov 29 08:04:45 UTC 2013


Author: rodrigc
Date: Fri Nov 29 08:04:45 2013
New Revision: 258737
URL: http://svnweb.freebsd.org/changeset/base/258737

Log:
  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

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Fri Nov 29 07:55:44 2013	(r258736)
+++ head/sys/vm/uma_core.c	Fri Nov 29 08:04:45 2013	(r258737)
@@ -1689,8 +1689,9 @@ keg_dtor(void *arg, int size, void *udat
 	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);


More information about the svn-src-all mailing list