Re: git: caabdb3aefdc - main - contigmalloc.9: Note that M_WAITOK may still return NULL

From: Ed Maste <emaste_at_freebsd.org>
Date: Fri, 24 Jul 2026 15:44:21 UTC
> That said, I think the claim in the man page is actually wrong now.
> contigmalloc(M_WAITOK) certainly used to be able to return NULL, but I
> think that might no longer be true now that kmem_alloc_contig() is
> implemented using domainset iterators.  If we try all domains, we'll end
> up sleeping and retrying indefinitely, or at least it appears to be that
> way.

Hmm, contigmalloc does check kmem_alloc_contig's return for NULL, so
if this is the case we should probably make that a KASSERT instead.