From: Rich Griswold <rgriswol@us.ibm.com>
Subject: Re: Size of types on Alpha
Date: 2000/06/12 [thread overview]
Message-ID: <39454597.1AF793D3@us.ibm.com> (raw)
In-Reply-To: 8i3a1f$pn$1@agate.berkeley.edu
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 <stdio.h>
> >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 <stddisclaimer.h>
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"
next prev parent reply other threads:[~2000-06-12 4:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-12 4:00 Size of types on Alpha Ian Wilkinson
2000-06-12 4:00 ` Rich Griswold
2000-06-12 4:00 ` Peter Mardahl
2000-06-12 4:00 ` Rich Griswold [this message]
2000-06-12 4:00 ` Greg Lindahl
2000-06-12 4:00 ` Jeff Sturm
2000-06-13 4:00 ` Christian Weisgerber
2000-06-13 4:00 ` Jeff Sullivan
2000-06-14 4:00 ` Ian Wilkinson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox