[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [llnl-devel] Re: [Freeipmi-devel] xmalloc

From: Anand Babu
Subject: Re: [llnl-devel] Re: [Freeipmi-devel] xmalloc
Date: Tue, 30 Dec 2003 17:05:51 -0800
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Hi Al,
Got it. I will replace xmalloc with XMALLOC which set errno and
return even if the system runs out of memory.

,----[ Albert Chu <address@hidden> ]
| Perhaps this a "philosophical" thing to me, but my opinion is that
| libraries should never fail/exit unless it is a fatal error and bug
| within the library (for example failing at an assert()).
| It is ok for applications to exit on a malloc error, b/c that is the
| choice of the developer.  But if we are developing a library for other
| developers to use, I don't think a library should make the choice for
| them.  This is the same reason why we return errnos for sendto(),
| recvfrom(), write(), etc.

Anand Babu
Free as in Freedom <>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]