On Thu, Aug 27, 2015 at 04:06:23PM +0200, Xavier Bestel wrote:
> Under linux malloc() will only return NULL when you get out of address
> space, i.e. virtually never on a 64bits machine. Low memory situations are
> handled elsewhere (e.g. OOM killer).
> So I don't think checking malloc() for NULL is that wise.

It depends on the kernel overcommit configuration. In the default
configuration getting NULL is unlikely, but that doesn't mean it
should result in a segfault. I'm just not convinced there is any point
in trying to recover from that.

-- 
Miroslav Lichvar

------------------------------------------------------------------------------
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to