Re: How to determine if running on a 32 or 64 bits kernel ?
- From: phil-news-nospam@xxxxxxxx
- Date: 14 Feb 2008 17:58:29 GMT
On Thu, 14 Feb 2008 07:39:27 -0800 (PST) laurent.charmet@xxxxxxxxx wrote:
| On Feb 14, 3:45 pm, Chris Friesen <cbf...@xxxxxxxxxxxxx> wrote:
|> laurent.char...@xxxxxxxxx wrote:
|> > I'm looking for an API or whatever to determine if kernel/os is 32 or
|> > 64 bits. It must be dynamic, because my binary can be compiled on a
|> > machine and run on another.
|>
|> If you run a 32-bit app on a 64-bit system, it was still compiled as a
|> 32-bit app.
|>
|> Why do you want to know the word size of the kernel?
|>
|> Chris
|
| Because I want to check if installed/running binaries are well fited.
| It's perfectly legal to run 32 bits on a 64 bits os, but in some case
| my program load external dll or external program load some of my libs.
| And mixed 32/64 bits dll is a source of errors. So I prefer warm user
| that installed version is not the right. On same spirit, it's not good
| to run X86 binaries on itatium because emulation has a big cost.
So you would want to know also if your program is running inside some kind
of virtualization or emulation? You could be running on an emulated 32-bit
sparc system inside qemu running on a 32-bit kernel running in a domU of a
Xen system running with a 64-bit dom0 kernel on an AMD CPU. Have fun.
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2008-02-14-1156@xxxxxxxx |
|------------------------------------/-------------------------------------|
.
- Follow-Ups:
- Re: How to determine if running on a 32 or 64 bits kernel ?
- From: Joe Beanfish
- Re: How to determine if running on a 32 or 64 bits kernel ?
- References:
- How to determine if running on a 32 or 64 bits kernel ?
- From: laurent . charmet
- Re: How to determine if running on a 32 or 64 bits kernel ?
- From: Chris Friesen
- Re: How to determine if running on a 32 or 64 bits kernel ?
- From: laurent . charmet
- How to determine if running on a 32 or 64 bits kernel ?
- Prev by Date: Re: How to determine if running on a 32 or 64 bits kernel ?
- Next by Date: semantics of unshared namespace
- Previous by thread: Re: How to determine if running on a 32 or 64 bits kernel ?
- Next by thread: Re: How to determine if running on a 32 or 64 bits kernel ?
- Index(es):
Relevant Pages
|