How can I programmatically determine my processor type?

后端 未结 7 590
清歌不尽
清歌不尽 2021-01-13 01:03

How can I determine programmatically whether my machine is an x86, x64 or an IA64?

7条回答
  •  攒了一身酷
    2021-01-13 01:39

    What's usually more important than the underlying processor is what mode the OS is running in, in ADDITION to the processor that's installed on the host.

    Examine the output of "uname -p" (or uname(2))

    Intel adopted AMD's extensions for 64-bit instructions so a value of "x86_64" means you're running either an Intel or AMD 64-bit processor, otherwise you're running the regular x86 ISA.

提交回复
热议问题