apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject Re: standards (was: Re: Memory Renaming (try 2))
Date Sun, 13 May 2001 09:56:20 GMT
Exactly.  The patch that will go in shortly has apr_sms_calloc.  It will
also have an autoconf check for calloc :)

Thanks for the prod on CTR, expect something soon.

----- Original Message -----
From: "Greg Stein" <gstein@lyra.org>
To: "APR Development List" <dev@apr.apache.org>
Sent: Sunday, May 13, 2001 8:50 AM
Subject: standards (was: Re: Memory Renaming (try 2))

> 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
>    of them; thus, a "standard" means nothing to us
> 2) APR exports its own API with its own semantics; they don't have to
>    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
> 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.
> Cheers,
> -g
> --
> Greg Stein, http://www.lyra.org/

View raw message