delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/09/07:58:27

Date: Thu, 9 Jan 1997 07:31:33 -0500
Message-Id: <199701091231.HAA02294@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: res AT marstu DOT mari DOT su
CC: zager AT post DOT comstar DOT ru, djgpp AT delorie DOT com
In-reply-to: <199701090726.KAA00800@marstu.mari.su> (message from Serge
Golovin on Thu, 9 Jan 1997 10:26:54 +0300 (MSK))
Subject: Re: Another aspect of free() ?

> Why do you need XFREE while FREE exists?

xmalloc() checks for null return from malloc, and dies if so.
xrealloc() checks for you passing a null, and calls malloc() if so.
xfree() checks for you passing a null, and ignores it if so.

Some systems have broken malloc/realloc/free, so the x*() versions fix
them.  This is common practice under Unix.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019