Jump to content
  • Advertisement
Sign in to follow this  
moeron

64 bit pointer question

This topic is 4812 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am yet to really play around with the 64bit machines at my work, but I was wandering through some Win32 code and a question occurred to me. Are near and far pointers being resurrected on 64 bit systems? Will there be 32 and 64 bit pointers or just 64? I guess it really doesn't matter, just more of a curiousity question really. Thanks, moe.ron

Share this post


Link to post
Share on other sites
Advertisement
Theoretically, as of the Pentium-Pro you could have a need for near and far pointers since they expanded the memory address bus to 48bits with the release of the pro. Practically, no OS supports it, each process has a 4GB virtual address space.

On a 64-bit machine, you would no longer have a need for near and far since the 64bit pointer would be large enough to address the entire memory space again (if/until they expand the memory bus beyond 64bits).

Share this post


Link to post
Share on other sites
Quote:
Original post by moeron
Are near and far pointers being resurrected on 64 bit systems? Will there be 32 and 64 bit pointers or just 64?

In C, C++, or whatever other languages, it's up to the compiler/language/CPU pair.

Read your documentation to be sure, it's most likely to always be 64-bits.

There has been discussion about multiple pointer sizes in many different communities. Many systems could have 32 and 64-bit pointers simultaniously (what you call near/far), as well for hardware-specific sizes, but compiler writers would commit a ritual suicide using the 16/21/22/32/48/64/76/other -bit pointers they would be forced to maintain through all eternity.

In IA64 Assembly, the chipset does not have an absolute addressing mode, so you'll need to do the segment:offset model, in this case with the r1/gp register for the segment. Fortunately you don't need to know about that for most programming.

[gripe]
I've been surprised that it's taken 'mainstream' computing and Sony/MS consoles this long to make the jump up to 64-bit integers. PPC, SH, MIPS, and a bunch of other processors have been there for quite some time. 64-bit console processors have been in use in the game industry for over 12 years and 128-bit co-processors and graphics engines are commonplace. (frob glances toward N64, and the GameCube that doesn't use the 64-bit that's included on it's PPC chip...)

It's interesting that when MS and Sony jump, they both go to PPC-based systems. It's nice to see at least Sony is close to understanding that people could use multiple processors and that good games aren't just about how many tris/sec they can pump out.

Sega had that figured out in 1993, with 5 CPUs, each with different characteristcs using 16, 32, and 64-bit chips. I sometimes wish the Dreamcast hadn't died.
[/gripe]

Frob.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!