Can contigmalloc(9) fail even when M_NOWAIT is *not* specified?
Andriy Gapon
avg at FreeBSD.org
Mon Jul 9 14:41:56 UTC 2018
On 09/07/2018 09:21, Pratyush Yadav wrote:
> 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?
Yes.
--
Andriy Gapon
More information about the freebsd-hackers
mailing list