Autor: Rick Moen Datum: To: dng Betreff: Re: [DNG] Please keep 32-bits alive
Quoting Enrico Weigelt, metux IT consult (enrico.weigelt@???):
> Some more: I'm still running 32bit userland even on 64bit machines,
> to save some memory. Especially for applications that heavily use
> pointers, it does make a notable difference.
Yes, the fact that x86_64 (and other 64-bit) pointers each chew up 8
bytes[1] (64 bits) wide, and thereby gobble 2x the RAM, each, compared to
IA32, can be a significant problem in code that uses pointers a great
deal, and is very vexing. This irritation's inescapable in
64-bit-compiled code, because those pointers need to be able to hold the
address of any valid memory location the CPU can address, whereas 32-bit
pointers can reach 4GB address space (which seemed impossibly large not
so long ago).[2]
So, yes, IA32 compilation (preferably in an otherwise x86_64 host, as
you're doing) is just the thing for being RAM-thrifty if you don't need
to access TB of RAM and the code is making heavy use of pointers.
Wikipedia's article on 64-bit computing says:
The main disadvantage of 64-bit architectures is that, relative to
32-bit architectures, the same data occupies more space in memory (due
to longer pointers and possibly other types, and alignment padding).
This increases the memory requirements of a given process and can have
implications for efficient processor cache use. Maintaining a partial
32-bit model is one way to handle this, and is in general reasonably
effective.
So, yay for a partial IA32 model within an x86_64 environment: smaller
pointer-heavy binaries where you need them, but also software access to
up to 8TB physical RAM (and 4 exabytes = 2^64 of virtual memory) where
you don't -- best of both worlds.
And, don't forget, year 2038 effects beckon, starting long before 2038.
[1] There are three distinct data-type models for 64-bit: ILP64,
LLP64, and LP64. But all have 8-byte pointers. The differences lie in
lengths of non-pointer data types.
[2] What really changed my mind about this is VM technology. Ability to
have the production server host in one VM and the beta in another, and
the small host OS doing security & other monitoring of both, is cool.