delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/06/19/23:18:05

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <9706200301.AA13408@clio.rice.edu>
Subject: Re: Possible misbehavior of write
To: dj AT delorie DOT com (DJ Delorie)
Date: Thu, 19 Jun 1997 22:01:31 -0600 (CDT)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <199706192146.RAA08803@delorie.com> from "DJ Delorie" at Jun 19, 97 05:46:23 pm

> If we're going to go through everything and add a macro, make
> it take the count as well:
> 	_djbadptr(ptr,count)

True, and think about a standard name too...

> All of the above, depending on a define?  That way the programmer has
> control over the level of `protection'.  The first one for production
> release, the second and third for varouse levels of paranoia during
> developement.

I have no preferences about what the macro/routine does, but it does make
it easy to change the behavior globally with a single change.  I'm not
completely convinced it's one of those changes worth the effort, but if
we make the effort we might as well design for maintainability and 
flexibility.  

> I take it `extern int _djbadptr();' is meant to do all the sophisticated
> checking Charles proposed earlier.

Could be.  Could be anything.  If it's a function then you have the 
call overhead, but you can replace the function easily for personal 
preference without a library re-compile.

> The only hastle I can see is the need to distribute multiple libraries
> or answere a lot of question relating to code size/how to get debug code etc.

I would not distribute multiple libraries.  As DJ pointed out, we've gone
a couple of years now before this came up, so it can't be too important...
If someone needs it, recompile the library.  My 2 cents...

- Raw text -


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