Re: gb_t and memMeter

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Mon, 30 Apr 2001 18:54:19 +0200

On 1 May 2001, at 0:25, Adrian Chadd <adrian@creative.net.au> wrote:

> On Mon, Apr 30, 2001, Alex Rousskov wrote:
>
> > > Use a quad_t. That avoids an FPU operation.

 uh. Is that the reason for fancy gb_t ? I'd imagine we wanted to
 avoid FPU op when these struct were updated during every single
 memPoolAlloc call.
 Now that it is to be called relatively rarely, is that a problem?
 We use doubles all over the place...

> > IIRC, the original reason for gb_t was the precision. Double counters
> > might miss a few bytes as they become large. Whether the precision is
> > important for current applications of gb_t is a separate question.
>
> Right.

 So, is it, or it isn't? How far is precision of double good enough?
 I'd imagine that if we have a counter beyond 4G, we don't care much.

> > If you end up using doubles or quad_t (how portable is that?) instead,
> > please make sure that we never convert your counter or its derivative
> > to an "int" using a C cast because such a conversion may cause an
> > arithmetic exception.
>
> quad_t is on the platforms I use (tru64, linux, freebsd, solaris).
> long long might be the go on other platforms.

 well, then perhaps I should take long long?

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Mon Apr 30 2001 - 10:59:29 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:51 MST