From cf874b345d0f766fb64cf4737e1c85ccc78d2bee Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 19 Feb 2003 05:47:46 +0000 Subject: Back out M_* changes, per decision of the TRB. Approved by: trb --- sys/kern/kern_malloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/kern/kern_malloc.c') diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 33d23f1..c182120 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -173,7 +173,7 @@ malloc(size, type, flags) #endif if (!(flags & M_NOWAIT)) KASSERT(curthread->td_intr_nesting_level == 0, - ("malloc() without M_NOWAIT in interrupt context")); + ("malloc(M_WAITOK) in interrupt context")); if (size <= KMEM_ZMAX) { if (size & KMEM_ZMASK) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; @@ -206,7 +206,7 @@ out: mtx_unlock(&ksp->ks_mtx); if (!(flags & M_NOWAIT)) - KASSERT(va != NULL, ("malloc() without M_NOWAIT returned NULL")); + KASSERT(va != NULL, ("malloc(M_WAITOK) returned NULL")); if (va == NULL) { t_malloc_fail = time_uptime; } @@ -501,7 +501,7 @@ sysctl_kern_malloc(SYSCTL_HANDLER_ARGS) mtx_unlock(&malloc_mtx); bufsize = linesize * (cnt + 1); - p = buf = (char *)malloc(bufsize, M_TEMP, M_ZERO); + p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); mtx_lock(&malloc_mtx); len = snprintf(p, linesize, @@ -581,7 +581,7 @@ sysctl_kern_mprof(SYSCTL_HANDLER_ARGS) waste = 0; mem = 0; - p = buf = (char *)malloc(bufsize, M_TEMP, M_ZERO); + p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); len = snprintf(p, bufsize, "\n Size Requests Real Size\n"); bufsize -= len; -- cgit v1.1