From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,1b9c4dbbc913ec4e X-Google-Attributes: gid1164f8,public From: hoffman@xdelta.zko.dec.nospam (Hoff Hoffman) Subject: Re: Linux and C pointers (was: Re: HELP with pointers into mem!!!!!!! Date: 2000/05/02 Message-ID: <8enkvs$iub$1@mailint03.im.hou.compaq.com>#1/1 X-Deja-AN: 618458078 Distribution: world References: <390F2291.26ECE26D@hotmail.com> X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 957306684 19403 16.32.80.251 (2 May 2000 22:31:24 GMT) Organization: Compaq Computer Corporation Reply-To: hoffman@xdelta.zko.dec.nospam NNTP-Posting-Date: 2 May 2000 22:31:24 GMT Newsgroups: comp.sys.dec In article <390F2291.26ECE26D@hotmail.com>, Antony Zyrmpas writes: : I am working on a Linux dec alpha using C and have a question. I am :using integer pointers into memory, but int types are only 2-4 bytes :long, while memory is addressed by 8 byte words. Is there any way to :make C ints 8 bytes long or is there other solutions possible to this :problem? Which C compiler are you using, what version, and what are the compile-time options you are using? For 64 bits of addressing, you need eight bytes of storage. Various data structures do not require quadword (8 bytes; using the OpenVMS terminology) storage, and various compilers thus use longword (4 bytes) for many integers. At worst, you can stuff the pointer into 8 bytes of storage, but there's very likely a better/prettier way to do this. Depending on the C compiler, check around for the "long long" or the "__int64" data types. Also check the Linux sources, as casting pointers around has to have come up somewhere during the development of the Alpha port. I'd also tend to suggest asking this in a C or Linux newsgroup, assuming that, say, the Gnu C documentation for Linux doesn't have an answer for this particular question. --------------------------- pure personal opinion --------------------------- Hoff (Stephen) Hoffman OpenVMS Engineering hoffman#xdelta.zko.dec.com