On Tuesday 16 May 2006 6:44 pm, Bryan J. Smith wrote:
Yes, in the Windows world -- where intelligent Microsoft architects design good APIs and then Microsoft's own tool developers and application divisions _ignore_ them (despite Microsoft always blaming the problem on ISVs, it's Microsoft itself) -- it's a major issue (and always has been).
But the IEEE POSIX and X/Open SUS has addressed the split 32-bit/64-bit memory model on Alpha, MIPS, SPARC and now x86-64. There is no reason not to follow the specifications, and the GNU compiler targets do exactly that.
Compilers and toolchains will _never_ solve memory model issues. Just as an aside. There are a number programming memory models in use. In the Unix?Linux world, we use LP32 for 32-bit programming where long integers and pointers are 32bits. In the 64-bit world, we chose the LP64 model where long integers and pointers are 64-bits and integers remain at 32-bits. I say we as this is the model that Digital chose for Tru64 Unix (previously Digital Unix and OSF/1) back in the early 1990s. http://www.unix.org/version2/whatsnew/lp64_wp.html
LP32 and LP64 are not the only models in use. Microsoft chose LLP64 which
defines both the int and long int datatypes as 32-bits using only long long
and pointers at 64-bits. (Note that all of the models define
single-precision floating point as 32-bits and double precision floating
point at 64-bit (IEEE 754 standard).
One thing that comes into play here when talking about memory models is
virtual memory. A 32-bit program can only directly address 4GB of data
(segmented into stack, text, initialized data, heap, and mmapped segments)
where a 64-bit program can address 16 exabytes. (Certainly there are
physical limitations of the chips - PAE-52 for instance), and the 2.6
kernel permits addresses up to 64GB.
There are different needs in the community. Today's servers have need to
much larger physical memory, especially with multi-core, multi-CPU
architectures. The AMD-64 and EM64T architectures work well on the desktops
and in many server configurations where the larger servers need
architectures, such as IA64. The IA64 has a much different physical memory
model than does the X86-64 chips, but I'm not going to get into the
architecture.
--
Jerry Feldman