Index: sys/kern/kern_malloc.c =================================================================== --- sys/kern/kern_malloc.c +++ sys/kern/kern_malloc.c @@ -542,6 +542,8 @@ once++; } } + KASSERT((flags & M_NEVERFREED) == 0, + ("malloc: M_NEVERFREED is for internal use only")); #endif #ifdef MALLOC_MAKE_FAILURES if ((flags & M_NOWAIT) && (malloc_failure_rate != 0)) {