[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Yet another look at the apr_off_t problem

From: Travis P <svn_at_castle.fastmail.fm>
Date: 2004-01-25 21:34:24 CET

On Jan 24, 2004, at 9:32 AM, Julian Foad wrote:

> If "int" is not big enough for someone's line numbers, then they
> almost certainly need a bigger computer (one which is natively 64-bit
> or 128-bit).

I do not understand that statement. The native capability of the
machine will probably not have any effect on the size of the int type
(I know it won't for xlc or gcc and give references below). If you
write APIs assuming that ints will increase in size based on native
machine register width, it likely won't work as you expect. If line
numbers are represented by ints, then 2^31 lines is most likely the
maximum that will ever work, independent of machine register sizes.

Some references for those interested:

* On the Power/PowerPC front, which has been 64-bit for a relatively
long time:

   AIX 5L Porting Guide, Chapter 3. Issues regarding 32-bit and 64-bit

   I'm also rather partial to the older "AIX 64-bit Performance in
Focus" which can no longer be found by searching, but here's a direct
link: http://www.redbooks.ibm.com/redbooks/pdfs/sg245103.pdf

* On the AMD/gcc front,

     Generate code for a 32-bit or 64-bit environment. The 32-bit
environment sets int, long and pointer to 32 bits and generates code
that runs on any i386 system. The 64-bit environment sets int to 32
bits and long and pointer to 64 bits and generates code for AMD's
x86-64 architecture.

FWIW, explicitly choosing 64-bit integer values for line numbers
appears to be a smart move to me.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 25 21:34:16 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.