On 2003-02-19 09:14, [EMAIL PROTECTED] wrote: > The attached patch will print a backtrace if any calls to malloc > fail to have either M_WAITOK or M_NOWAIT. [...]
> --- kern/kern_malloc.c 19 Feb 2003 05:47:25 -0000 1.116 > +++ kern/kern_malloc.c 19 Feb 2003 07:55:19 -0000 > @@ -167,11 +167,21 @@ > #endif > register struct malloc_type *ksp = type; > > + indx = flags & (M_WAITOK | M_NOWAIT); > + if (indx == M_NOWAIT) { > + /* OK */ > + } else if (indx == M_WAITOK) { > + /* OK */ > + } else { Or, a simpler version: /* Either M_NOWAIT or M_WAITOK must be set. */ if (indx != M_NOWAIT && indx != M_WAITOK) { printf("Missing M_WAITOK flag\n"); backtrace(); flags |= M_WAITOK; } :=) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message