![]() |
| | #1 |
| Registered User Join Date: Mar 2002
Posts: 57
| Porting from 32 bit machine to 64 bit machine! First of all apologies if this is not the right forum. This is a first of its kind for me. There is an existing 32 bit C application that needs to be ported to a 64 bit machine. Now apart from taking care of pointers, size of int, conversions, Endian-ness, so and so forth, there is something else that has to be answered. Perhaps the question will be vague and ideas incoherent. So please bear with me. I have been asked to also find out, what can be suggested by us to the end customers as a good reason to increase RAM (why the same increase would not do the trick in a 32 bit machine, but in 64 bit machine)? So lets take a 32 bit machine with 512 MB RAM. The virtual process address space is 2 ^32 - 1. In a 64 bit machine it will increase to 2 ^64 - 1. But will the increase in the RAM, not be beneficial in both the cases? I mean, and I could be wrong here, I think the question is perhaps not correct technically, since an increase in the RAM will help in either case. Putting it more strictly, can there be a case when an increase in the RAM would only benefit a 64 bit application on a 64 bit machine, and not a 32 bit application on a 32 bit machine? Any pointers as to how to proceed to investigate will be highly appreciated. Thanks in advance, Anoop.
__________________ Intelligence: Finding an error in a Knuth text. Stupidity: Chasing that $2.56 cheque you got. Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live. If Java had true Garbage collection, most programs would delete themselves upon execution. |
| anoopks is offline | |
| | #2 |
| Registered User Join Date: Jan 2002 Location: Cardiff
Posts: 2,219
| 64 bit can have a load more ram whereas 32 bit is restricted to 4gb max. We are quickly moving towards that 4gb ceiling so it is a good idea to switch to 64 bit now. |
| Brian is offline | |
| | #3 |
| Registered User Join Date: Mar 2002
Posts: 57
| lol yes, that would be the physical limit and in real world perhaps not many end users would like to match that limit. Anoop.
__________________ Intelligence: Finding an error in a Knuth text. Stupidity: Chasing that $2.56 cheque you got. Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live. If Java had true Garbage collection, most programs would delete themselves upon execution. |
| anoopks is offline | |
| | #4 | |
| Registered User Join Date: Jan 2002 Location: Cardiff
Posts: 2,219
| Quote:
Last edited by Brian; 02-23-2005 at 02:28 PM. | |
| Brian is offline | |
| | #5 |
| Super Moderator Join Date: Aug 2001
Posts: 7,819
| No need to go to 64-bit yet until it has been tried and tested. I'm not paying to be someone else's guinea pig. It's just a bigger pipe anyways.
__________________ If you aim at everything you will hit something but you won't know what it is. |
| Bubba is offline | |
| | #6 |
| Registered User Join Date: May 2004
Posts: 1,362
| >>It's just a bigger pipe anyways. You say it like it is no big deal. Maybe it isn't yet, but 64-bit is the next gen of personal computers.
__________________ |
| sand_man is offline | |
| | #7 |
| & the hat of GPL slaying Join Date: Sep 2001
Posts: 5,732
| Actually the next generation is 3 state devices or 4 state devices. Then there are of course bio-electrial devices after that. To answer the OP's orignal question: Unless you made assumptions there is nothing you really need to do to convert. The majority of what'll change is how big certain objects are. But if you are using good methods (like sizeof(int) instead of 4) then you'll be just fine. |
| Thantos is offline | |
| | #8 |
| Yes, my avatar is stolen Join Date: Dec 2002
Posts: 2,544
| You may be interested in this article series: Old New Thing: Summary of the recent spate of /3GB articles >> But will the increase in the RAM, not be beneficial in both the cases? << Extra RAM will only be beneficial if the system or your program is using the extra memory available. |
| anonytmouse is offline | |
| | #9 |
| Registered User Join Date: Jan 2005
Posts: 14
| If you’re dealing with numbers larger than 32 bits 64 bit processors are faster as they don’t need to split the number up into two parts as a work around. A larger instruction set has also been introduced to improve the efficiency of the. Fedora produce a 64 bit open source operations system. More that 4GB of memory is quite limited unless you count the forth-coming version of windows. Other uses may include massive graphic files or video editing. Bear in mind that sticks of RAM of 2GB cost more that 5 times as much as a 1GB stick. Benefit will depend on the type of app you have written, an office application will see no benefit whereas a maths package may well. You would be wise to wait a couple of months as dual core 64 bit processors are just around the corner hopefully.
__________________ Currently Reading: Mathematic from the birth of numbers, Effective TCP/IP programming, Data Compression: The Complete Reference, C Interfaces and Implementations: Techniques for Creating Reusable Software, An Introduction to Genetic Algorithms for Scientists and Engineers. |
| CBUK is offline | |
| | #10 |
| The C-er Join Date: Mar 2004
Posts: 186
| 64 bit is a must (soon). My bro does 3D design using Rhino, and it struggles with *only* 1.25 GB RAM with the complex models he produces. With windows having a 2GB limit per process, there's not much headroom now. Also I'd like to write stuff with a 64 bit processor in mind for performance reasons. Remember the x86-64 architecture gives the register-starved 386 model some much needed registers, which compilers will like. |
| Jez is offline | |
| | #11 | |
| Registered User Join Date: Feb 2005
Posts: 19
| Quote:
| |
| fungus_mungus is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| File IO | Jack1982 | C++ Programming | 9 | 10-15-2007 01:14 AM |
| If the RGB color is (64, 64, 255), change it to (64, 255, 64). | Grayson_Peddie | C# Programming | 2 | 06-14-2003 04:26 PM |
| How do I print 64 bit unsigned integer in hex? | electrolove | C Programming | 7 | 02-11-2003 12:43 PM |
| 64 bit variables | Yawgmoth | C Programming | 11 | 12-19-2002 01:55 PM |
| 16 bit or 32 bit | Juganoo | C Programming | 9 | 12-19-2002 07:24 AM |