Author: bz
Date: Sat Apr  9 09:24:05 2016
New Revision: 297732
URL: https://svnweb.freebsd.org/changeset/base/297732

Log:
  Make the KASSERT message in hash destroy more informative.
  While the pointer might not be too helpful, the malloc type might at
  least give a good hint about which hashtbl we are talking.
  
  MFC after:    2 weeks
  Sponsored by: The FreeBSD Foundation
  Reviewed by:  gnn, emaste
  Differential Revision:        https://reviews.freebsd.org/D5802

Modified:
  head/sys/kern/subr_hash.c

Modified: head/sys/kern/subr_hash.c
==============================================================================
--- head/sys/kern/subr_hash.c   Sat Apr  9 04:57:25 2016        (r297731)
+++ head/sys/kern/subr_hash.c   Sat Apr  9 09:24:05 2016        (r297732)
@@ -93,7 +93,8 @@ hashdestroy(void *vhashtbl, struct mallo
 
        hashtbl = vhashtbl;
        for (hp = hashtbl; hp <= &hashtbl[hashmask]; hp++)
-               KASSERT(LIST_EMPTY(hp), ("%s: hash not empty", __func__));
+               KASSERT(LIST_EMPTY(hp), ("%s: hashtbl %p not empty "
+                   "(malloc type %s)", __func__, hashtbl, type->ks_shortdesc));
        free(hashtbl, type);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to