tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: how to tell if a process is 64-bit



> In a cross-platform process utility tool the question came up how to
> decide if a process is 64-bit.
> 
> https://github.com/giampaolo/psutil/issues/1102
> 
> What's the best answer for NetBSD?

in C:

internally, just check #ifdef _LP64.
externally, kvm_getprocs() with KERN_PROC_PID.

in other languages?  don't ask me.


.mrg.


Home | Main Index | Thread Index | Old Index