Skip to main content
gamedev.net
🔒 Locked

64 bit pointer question

Started by moeron 2 replies 800+ views
Original Post
moeron
moeron
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
moe.ron
SiCrane
SiCrane
They should all be 64-bit (for normal pointers). Pointers to member functions may be bigger.
Shannon Barber
Shannon Barber
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).
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
frob
frob
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.