Index: kern/kern_malloc.c =================================================================== --- kern/kern_malloc.c (revision 238532) +++ kern/kern_malloc.c (working copy) @@ -549,9 +549,13 @@ if (!(slab->us_flags & UMA_SLAB_MALLOC)) { #ifdef INVARIANTS struct malloc_type **mtpp = addr; + static int malloc_trash_free = 1; #endif size = slab->us_keg->uk_size; #ifdef INVARIANTS + if (malloc_trash_free) { + memset(addr, 0xa5, size); + } /* * Cache a pointer to the malloc_type that most recently freed * this memory here. This way we know who is most likely to