Date: Mon, 1 Feb 2016 22:02:58 +0100 From: Mike Belopuhov <mike@belopuhov.com> To: Ryan Stone <rysto32@gmail.com> Cc: "freebsd-arch@freebsd.org" <arch@freebsd.org> Subject: Re: OpenBSD mallocarray Message-ID: <20160201210256.GA29188@yamori.belopuhov.com> In-Reply-To: <CAFMmRNyNKOgDEY89dVB=dqYDq6XyQo=MQR%2BHPJ2=_0VdDKRvAw@mail.gmail.com> References: <CAB815ZafpqJoqr1oH8mDJM=0RxLptQJpoJLexw6P6zOi7oSXTQ@mail.gmail.com> <CAG6CVpWbaFOQ1GzE1qmZFodXg_xZafmCc0b1kUh=0%2BFAjLPRvA@mail.gmail.com> <CAFMmRNyNKOgDEY89dVB=dqYDq6XyQo=MQR%2BHPJ2=_0VdDKRvAw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 01, 2016 at 15:56 -0500, Ryan Stone wrote: > On Mon, Feb 1, 2016 at 3:16 PM, Conrad Meyer <cem@freebsd.org> wrote: > > > > > Sure. +1 from me. I don't think we want the M_CANFAIL hack, though. > > > > Best, > > Conrad > > > > > That may be the OpenBSD equivalent of M_NOWAIT. Not quite. From the man page: M_CANFAIL In the M_WAITOK case, if not enough memory is available, return NULL instead of calling panic(9). If mallocarray() detects an overflow or malloc() detects an excessive allocation, return NULL instead of calling panic(9). Cheers, Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160201210256.GA29188>