X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C6AC7A0.9B1CCE1E@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Malloc/free DJGPP code References: <3C6AAB24 DOT 48974C81 AT yahoo DOT com> <9791-Wed13Feb2002213359+0200-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 29 Date: Wed, 13 Feb 2002 20:11:35 GMT NNTP-Posting-Host: 12.90.176.204 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1013631095 12.90.176.204 (Wed, 13 Feb 2002 20:11:35 GMT) NNTP-Posting-Date: Wed, 13 Feb 2002 20:11:35 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > > > From: CBFalconer > > Newsgroups: comp.os.msdos.djgpp > > Date: Wed, 13 Feb 2002 18:08:10 GMT > > > > > And if unbuffered I/O is too slow, call setvbuf with a suitable buffer > > > instead. That should avoid the need to call malloc the first time printf > > > is called. > > > > Nope, that didn't do it. > > Sorry, I forgot that malloc is called in the startup code, so calling > setvbuf in `main' is too late. > > I guess the easiest way out of this mess is to use cprintf instead of > printf. Or move the setvbuf call into malloc itself, before the > first printf (with some kind of static flag, to do that only once). Well, back to the drawing board. Something that is isolated to the malloc module is preferable. I guess I will first look up cprintf. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net) Available for consulting/temporary embedded and systems. (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce AT ftc DOT gov (for spambots to harvest)