From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,66f71f9e29f106bb X-Google-Attributes: gid111c93,public From: Rich Griswold Subject: Re: Size of types on Alpha Date: 2000/06/12 Message-ID: <39454597.1AF793D3@us.ibm.com>#1/1 X-Deja-AN: 633680540 Content-Transfer-Encoding: 7bit References: <39450798.AFE590D7@us.ibm.com> <8i3a1f$pn$1@agate.berkeley.edu> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.rchland.ibm.com X-Trace: news.rchland.ibm.com 960841111 29296 9.5.218.81 (12 Jun 2000 20:18:31 GMT) Organization: IBM Rochester MN Mime-Version: 1.0 Reply-To: rgriswol@us.ibm.com NNTP-Posting-Date: 12 Jun 2000 20:18:31 GMT Newsgroups: comp.os.linux.alpha Peter Mardahl wrote: > > The program that Mr. Griswold posted is fine so far as it goes, > but THE SIZE OF TYPES MAY VARY FROM OS TO OS. > > Unicos, for example, has different sizes for some datatypes than > Digital UNIX. I can't remember if Linux sizes differ from Digital > UNIX or not: I believe they're the same though. I do not know about > *BSD or VMS on Alpha. > > Run Mr. Griswold's program yourself and you'll be fine. > > PeterM > > Rich Griswold wrote: > > >#include > >main(){ > > printf( "char %d\n", sizeof( char ) ); > > printf( "short %d\n", sizeof( short ) ); > > printf( "int %d\n", sizeof( int ) ); > > printf( "long %d\n", sizeof( long ) ); > > printf( "float %d\n", sizeof( float ) ); > > printf( "double %d\n", sizeof( double ) ); > > printf( "long double %d\n", sizeof( long double ) ); > >} > > > >Output on 21064A: > > > >char 1 > >short 2 > >int 4 > >long 8 > >float 4 > >double 8 > >long double 8 > > > >-- The output is from an Alpha Linux system. I assumed that since this newsgroup is comp.os.linux.alpha, you were interested in the sizes for Linux. In case you're interested here's the output of uname -a and /proc/cpuinfo for the system I ran the program on: Linux ironman 2.2.13-0.9 #3 Sun Feb 27 14:24:30 CST 2000 alpha unknown cpu : Alpha cpu model : EV4 cpu variation : 0 cpu revision : 0 cpu serial number : Linux_is_Great! system type : Avanti system variation : 0 system revision : 0 system serial number : MILO-0000 cycle frequency [Hz] : 233307816 timer frequency [Hz] : 1024.00 page size [bytes] : 8192 phys. address bits : 34 max. addr. space # : 63 BogoMIPS : 230.16 kernel unaligned acc : 21 (pc=fffffc000039a4fc,va=11ffffdea) user unaligned acc : 0 (pc=0,va=0) platform string : N/A cpus detected : 0 I don't know what the sizes are on other Alpha OSes, since I don't have access to any other systems. However, AIX 4.3 on 64-bit hardware uses the same sizes, if that's any help :) -- Richard Griswold #include On the products of the Sirius Cybernetics Corporation: "It is easy to be blinded to the essential uselessness of them by the sense of achievement you get from getting them to work at all. In other words... their fundamental design flaws are completely hidden by their superficial design flaws." Douglas Adams, "So Long, and Thanks For All the Fish"