Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* HELP with pointers into mem!!!!!!!
@ 2000-05-02  4:00 Antony Zyrmpas
  2000-05-02  4:00 ` Linux and C pointers (was: " Hoff Hoffman
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Zyrmpas @ 2000-05-02  4:00 UTC (permalink / raw)


   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?  thanks


Graham Schelle




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Linux and C pointers (was: Re: HELP with pointers into mem!!!!!!!
  2000-05-02  4:00 HELP with pointers into mem!!!!!!! Antony Zyrmpas
@ 2000-05-02  4:00 ` Hoff Hoffman
  0 siblings, 0 replies; 2+ messages in thread
From: Hoff Hoffman @ 2000-05-02  4:00 UTC (permalink / raw)



In article <390F2291.26ECE26D@hotmail.com>, Antony Zyrmpas <z_antony@hotmail.com> 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-05-02  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-02  4:00 HELP with pointers into mem!!!!!!! Antony Zyrmpas
2000-05-02  4:00 ` Linux and C pointers (was: " Hoff Hoffman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox