How to determine kernel bitness in Mac OS X 10.6?

前端 未结 3 1206
耶瑟儿~
耶瑟儿~ 2021-01-18 16:05

I know that I can use the terminal and the system-profiler command to determine the current bitness of the kernel but I am trying to determine if there is a way to get that

3条回答
  •  终归单人心
    2021-01-18 17:06

    You should be able to read the system profiler information in from command line like this:

    sys_profile = popen("system_profiler -xml", "r");
    

    See the ProfileSystem example in Apple's documentation for how to parse it.

    Software/System Software Overview/64-bit Kernel and Extensions is probably the key you want.

提交回复
热议问题