From: Walton Hoops Date: 2010-01-16T05:20:58+09:00 Subject: Re: How to know the OS architecture (32 or 64 bits)? On 1/15/2010 1:07 PM, Phillip Gawlowski wrote: > On 15.01.2010 20:56, Walton Hoops wrote: > >> My main concern with that though: >> Would RbConfig::CONFIG['host_cpu'] return "x86_64" if I'm running 32-bit >> Linux on a 64-bit CPU? > > No. If the OS isn't 64 bits itself, it'll run on an x86_64 > architecture, but the CPU is in 32 bit mode. The only thing you can > really test, is the bit-ness of the OS, not the CPU. > > After all, how should a 32 bit OS deal with a 64 bit memory address? > > -- > Phillip Gawlowski > Makes sense, but I don't know enough about low-level OS/hardware to be sure that there isn't a CPU flag exposed that would still allow for an app or the OS to determine the bittedness of the CPU. So I asked and was answered :-)