On Mon, Jan 12, 2009 at 9:50 AM, julius <jul...@juliuspaintings.co.uk> wrote: > Yes, but my understanding is that this will change when we go into a full 64 > bit architecture and as a one man band I would prefer to write code that > anticipates the change than to have to change everything later.
Well, that's wrong. > Also, the documentation > http://tinyurl.com/6ceoqz > leads me to believe that if I need an address space of more than 4GB then I > should be using 64 bit computing. It's true, but "64 bit computing" does not mean what you think it means. > So let me then ask: under the 64 bit architecture, will the standard c types > like int, char etc still be available and not give me problems under garbage > collection given I define them as strong? Yes, they are all identical to what they were before, with the exception of 'long', which becomes a 64-bit quantity. I don't know what your GC question is about, as GC only affects pointers. Let me briefly explain what "64-bit" is all about, because this seems to be the major point of confusion here. In a 32-bit processor, pointers are 32 bits long. Since 2^32 = 4 billion and change, this means that you can address about 4GB of memory. Also, usually but not always, on a 32-bit processor the largest native integer quantity is 32 bits long. Usually there is software support for 64-bit integers but it suddenly becomes significantly slower because the CPU can only deal with 32 bits at a time. In a 64-bit processor, pointers are 64 bits long. Since 2^64 = really huge, that means you can address a really huge amount of memory (it's equal to 4 billion and change squared). You also get native support for 64-bit integers. That's it! Pointer size and native 64-bit integers are the only difference between the two! Your chars don't suddenly expand from 8 bits to 64 bits. Your floats don't suddenly expand from 32 bits to 64 bits. (On Mac OS X your longs do suddenly expand from 32 bits to 64 bits, but int still gives you a 32-bit integer.) The only difference is the size of pointers and, sometimes, the ability to do native math on 64-bit integers. Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com