Jump to content
  • Advertisement
Sign in to follow this  
ms75214

32 bit or 64 bit

This topic is 2343 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

Advertisement
Aren't most macs 64 bit capable anyway. Failing that a 32 bit package will run on 64 bit OSx anyway.

Share this post


Link to post
Share on other sites
Does a 32 bit OS process code with 64 bit numbers (long, ulong) properly? I was under the impression that if you use 64bit operators, you need to run it on a 64bit OS.

Share this post


Link to post
Share on other sites
Does a 32 bit OS process code with 64 bit numbers (long, ulong) properly? I was under the impression that if you use 64bit operators, you need to run it on a 64bit OS.
Depends on the CPU architecture that your compiler is targeting. Regular, portable x86 code won't have the instructions/registers to do 64-bit ops in a single instruction; the compiler will have to use a few instructions to implement long long operations.

Share this post


Link to post
Share on other sites
But there is a new ABI coming up that uses the 64-Bit extensions on 32-Bit code.
If you need the 64-Bit data size for a special purpose so you are bound to use them you can use the types from stdint.h
They are fixed in size across different environments. This way you need not to know how long or long long is realized within the used environment.
stdint.h is not part of the MS compilers. But there are some versions around in the net that work with MS.

Share this post


Link to post
Share on other sites
But there is a new ABI coming up that uses the 64-Bit extensions on 32-Bit code.
That's Linux though, and still experimental / half finished.

As for "32 or 64 bit", my opinion is that if you have to ask, then you can just stick with 32 bit. 64 bit operating systems allow running 32 bit code just fine. A few rare operations might be slightly more expensive, but pointers are only half the size (which makes a big difference).
If you do need 64 bits, then you already know (you've already run out of address space once), you need not ask.

You really only need 64 bit if you have a dataset of considerably more than a gigabyte or two that you wish to keep in memory (mapped or otherwise). Most programs work just fine with a "normal" 2GB address space (which can be 4GB at no extra cost under a 64 bit OS if you only set the appropriate flag in the executable). Edited by samoth

Share this post


Link to post
Share on other sites
Guys, this is a mac application though, from what I can find there aren't any macs running OSX as 32 bit anymore apart from the old PowerPC models Edited by 6677

Share this post


Link to post
Share on other sites

Guys, this is a mac application though, from what I can find there aren't any macs running OSX as 32 bit anymore apart from the old PowerPC models

Still, with the proper portability conventions followed, producing both versions should be effortless and would allow the application to run on those old PowerPC models too smile.png

Of course, if applying those conventions would take a rewrite, it's probably not worth the time mellow.png so good point. +1

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!