OpenBSD mallocarray
Mike Belopuhov
mike at belopuhov.com
Mon Feb 1 21:03:03 UTC 2016
On Mon, Feb 01, 2016 at 15:56 -0500, Ryan Stone wrote:
> On Mon, Feb 1, 2016 at 3:16 PM, Conrad Meyer <cem at 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
More information about the freebsd-arch
mailing list