Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2018 11:51:02 +0530
From:      Pratyush Yadav <pratyush@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Can contigmalloc(9) fail even when M_NOWAIT is *not* specified?
Message-ID:  <CA%2BX=3T%2BBbcfY1BFGze=scxXFNPkh7Pn-Qx1kKGURi00adHCquw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

The contigmalloc(9) man page says:

> The contigmalloc() function does not sleep waiting for memory resources
> to be freed up, but instead actively reclaims pages before giving up.
> However, unless M_NOWAIT is specified, it may select a page for reclama-
> tion that must first be written to backing storage, causing it to sleep.

So if M_NOWAIT is *not* specified, can contigmalloc() "give up", and
return NULL?

-- 
Regards,
Pratyush Yadav



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BX=3T%2BBbcfY1BFGze=scxXFNPkh7Pn-Qx1kKGURi00adHCquw>