apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject standards (was: Re: Memory Renaming (try 2))
Date Sun, 13 May 2001 07:50:49 GMT
On Sat, May 12, 2001 at 05:07:59PM -0700, Justin Erenkrantz wrote:
> IMHO, calloc is in the same league as malloc, free, realloc.  ISO C 
> requires calloc as it does for the other three.  For the standard case,
> you shouldn't need to emulate these on all but the most brain dead 
> platforms.   These are the four that are required by C99 (and I believe 
> C89 does too - I just bought the 554-page C99 standard for $18 from 
> ansi.org because we keep having these debates about what is in the 
> standard or not...).  It seems silly to implement a memory system that 
> is not a superset of what is offered by the base language itself.  
> And, I think that all of the other memory systems will just have to 
> have the same contract as ISO C's for these functions (i.e. they have 
> to act the same, but they can grab or free the memory however they 
> wish).  So, if someone calls apr_sms_calloc, they better return back a
> memory space of the specified size zeroed out (or NULL if no more space
> is available) - no matter what the underlying system is (shared memory,
> kernel, user space, etc.).

Can we *please* stop talking about standards?

1) we don't work with standard conformant systems; we need to work with all
   of them; thus, a "standard" means nothing to us

2) APR exports its own API with its own semantics; they don't have to match
   a standard because it isn't part of that standard.

Talking about standards is just increasing the bandwidth of this already
burdensome discussion.

APR should choose some semantics and implement those. Done. Simple.

If we depend on calloc() or whatever, then we need to be prepared to not see
it on some systems (dunno what, tho) because we don't compile against ANSI
or ISO or anything like that. That is what autoconf is all about.


Greg Stein, http://www.lyra.org/

View raw message