delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/03/04/08:49:11

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Message-ID: <3C835CE4.E455B061@yahoo.com>
Date: Mon, 04 Mar 2002 06:39:16 -0500
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Malloc/free DJGPP code
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020304081933 DOT 6398G-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:
> 
> On Sun, 3 Mar 2002, CBFalconer wrote:
> 
> > I am getting debug access to things to allow diagnostic software
> > to interface cleanly, and I am finding anamolies between fwrites
> > (from the application) to stdout (the stream), and writes to
> > STDOUT (the handle) from the internal debugging code.  Causes
> > great confusion. I would much prefer things to appear in the order
> > written :-)
> 
> Why do you need to mix fwrite and write?  Why not use write alone?

The write is needed for the internal debuggery, which is entirely
turned off (and excised) by NDEBUG.  The external debuggery can
only function after initialization, so doesn't need the write
provisions at all.  Using fwrite etc. (really fprintf) makes the
external stuff purely standard after the single call to the
non-standard _sysmalloc().  What the external stuff does with the
data is entirely up to it, it needn't use any form of write/fwrite
etc. at all.

BTW, I have included a compile-time setting SAVEMEMORY which cuts
the overhead down to the 24 byte level and removes the high end
guard areas.  So the one configuration allows selecting the option
desired.

-- 
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)


- Raw text -


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