X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Wed, 13 Feb 2002 09:01:48 -0500 Message-Id: <200202131401.g1DE1mr04973@envy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <3C6A67A3.72C5DF79@yahoo.com> (message from CBFalconer on Wed, 13 Feb 2002 13:17:57 GMT) Subject: Re: Malloc/free DJGPP code References: <3C6A67A3 DOT 72C5DF79 AT yahoo DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > If this is a "don't do that" situation, how can we get malloc debug > printouts? You can't call printf from malloc, because printf uses malloc to allocate it's buffers. You end up infinitely recursing. If you really want to do this, call setbuf(stdout,0) at the beginning of your program (stderr too) to avoid the need for a buffer.