> > If the system is simply low on memory, kmem_malloc() will block. > > > > So malloc() will generally not return NULL even in low memory situations > > unless the KVM map fills up, which isn't supposed to happen but can in > > certain severe circumstances. Callers should therefore check for NULL. > > Callers that check for NULL are bogus.
If it can truly never return NULL, that's true. But it would also be true to say that callers that can't deal with a veto return and that can't guarantee deadlock avoidance are also bogus. I got the impression that my understanding of M_WAITOK's behaviour came from a discussion with you about it, but it looks like I was mistaken. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ m...@smith.net.au \\ The race is long, and in the \\ msm...@freebsd.org \\ end it's only with yourself. \\ msm...@cdrom.com To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message