Skip to contentSkip to conversation

IA-32 on x86-64

DISCUSSION John Richard Moser 3 participants 4 messages May 20, 2006

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Does anyone know how to check if I'm running an IA-32 process on x86-64?
More importantly, how do I tell how big the user VM space is for
current? Like 3GiB for x86 and who knows what (87GiB? 192GiB?) for x86-64 and however much for sparc/ppc ....

- --
All content of all messages exchanged herein are left in the Public Domain, unless otherwise explicitly stated.

Creative brains are a valuable, limited resource. They shouldn't be wasted on re-inventing the wheel when there are so many fascinating new problems waiting out there.
-- Eric Steven Raymond

We will enslave their women, eat their children and rape their cattle!
-- Bosc, Evil alien overlord from the fifth dimension
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBRG8Tjgs1xW0HCTEFAQLGPw/+MnsPqRchMPTfPAnmElB1I0drQpGKSzXM fbalToXhv1EKWnPN/Sj8JdVenech3okH75W6/Y+OGMOjTWYw46uvhVr9KBcXWxRU 3+Fkx6iJPTIklhOWkbxZKnDirFttZnAh0oU0akRv8ko8Y25siohRU5WU/ALulq1l ntlgHRz0mFhrVNukBEklq7nPre5/xJHLuwvDh2DKeMSbPHH5AsMC5li2Aa8tU72E C83cwrRfGF5rUvlz7ILU/CeWfLU2TyVH/ow/zUzs9Snbndpo9KCekm+MwdUGj3YP zt+bSMyKafBzpkrKrG11hm8l4j2Sxw9LdOCtD9Vbfu1e6YORnh/KHx6NNQ9+HibH 7UHZjlYwMq8I9VvJEWGcU43IsDp5q0VQ0W2vcEvdVcPmhmB2cRVljOdxXTQCAN86 ET2v6glufIvKy38ThO81zhgoxdnpGvJP4Tec34zihaNGDQ/jkzA23O8/8SLwFHr6 TizaQQsQLCAGOTRhGK4Phl2Yp+VJeKO9mq0vjAb9OBMl05MgLlqcJGm+MdLC1n+m FxHs568tPp07EnjX1UlADXVUa8dAHbjFPAyupW/M/HIe1uv5fbwB9kn0MAlVqm2u 7AkMfiFhgv6Bvoylb2b17iWDbsLBo0N77++9r1Wn5bRkU99rfCTwmI1fBrH57Q5N N2qNcoKBXpY=
=Nzyw
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 2 lines

Does anyone know how to check if I'm running an IA-32 process on x86-64?

printf("%d\n", sizeof(void *)) should report 4 with 32-bit code.

Quoted 2 lines

More importantly, how do I tell how big the user VM space is for current?

Find the bottom address of the stack. (This is left as an exercise.)

Jan Engelhardt

#2 lore raw
In reply to John Richard Moser
Quoted 4 lines · John Richard Moser

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Does anyone know how to check if I'm running an IA-32 process on x86-64?

is_compat_task()

Quoted 3 lines

More importantly, how do I tell how big the user VM space is for
current? Like 3GiB for x86 and who knows what (87GiB? 192GiB?) for x86-64 and however much for sparc/ppc ....

TASK_SIZE

You should probably do your own work instead of posting questions everytime you hit something you'd have to do a little bit of searching for.

--

#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Kyle McMartin
Quoted 4 lines · John Richard Moser

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Does anyone know how to check if I'm running an IA-32 process on x86-64?

is_compat_task()

Quoted 9 lines
Quoted 3 lines

More importantly, how do I tell how big the user VM space is for
current? Like 3GiB for x86 and who knows what (87GiB? 192GiB?) for x86-64 and however much for sparc/ppc ....

TASK_SIZE

You should probably do your own work instead of posting questions everytime you hit something you'd have to do a little bit of searching for.

Noted. As of late I've had the excuse that I've posted my last question just before I had to go to bed so everyone else would search for the answer while I sleep; but point taken ;)

Quoted 2 lines

--

- --
All content of all messages exchanged herein are left in the Public Domain, unless otherwise explicitly stated.

Creative brains are a valuable, limited resource. They shouldn't be wasted on re-inventing the wheel when there are so many fascinating new problems waiting out there.
-- Eric Steven Raymond

We will enslave their women, eat their children and rape their cattle!
-- Bosc, Evil alien overlord from the fifth dimension
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBRG+TmAs1xW0HCTEFAQKtBw/9Gia5K8GLmFo9WB1ePhzfb/tTug/clpoH iU0AEQgBoFOImKCXLliTdD4r/lr6a68nBei3Aseu9Son0VnIOiB+dI/BuYcpOdN6 b5EdZE9D6vCBR1YHeaMr2lkL6LROlHS4nkb0GPo0IKgWEjhumiK1XK8ojqKQpmh+ 2EJ4a0M68LSZJWbw1q58DcAsMACKwj2xtDpcjZsrCRMYwxLrP7wYx3bU6XKiKX2L u14Q8gMYNaYBYGLm0O7q0AwTwNT+i/tDWtnnuqUCZxiLtTWCLHstZBALEgW2WB6+ pEa+z/JdCuET9Zl3dvqH+5HsJJ7s9tuQA7svDgmatxZ5m0olWFI1Dlg4No2cwoQX 4y2q+a+gYdvgw4BUIh2Tf0XcJ10Sr6turdQc4YoNq2riB5JSH7MS6qedhU38eEKz 30jWv9yRl2CnVn5AzQHWICae4cSMaOP8KxkG3W9fbxJAur3yoAZVz+M3LecNNg5j GNbObd0COkJTem/eMTsT53WISGkaNG1kDPAkWQZqrusKNXelBwEhjaPhJj/K6isx v75+S+tJg0gW2mVBxHIw006Z44MnSU6nde9fD+o0C6J8uR42gGHHP2oCTsvtuMQb 6samg/keoAbeXAj3IaL7AgFp+V749U4ISK+3gl1nTxzSnlik4Y6YZ6IT6c1PCQX1 qzhSB5RpOgI=
=NG+P
-----END PGP SIGNATURE-----