Questions on 64 bit versions of Python

Rob Williscroft rtw at freenet.co.uk
Sat Jul 26 17:29:18 CEST 2008


Martin v. Löwis wrote in news:488aec52$0$21481$9b622d9e at news.freenet.de in 
comp.lang.python:

>> The end result of that is on a 32-bit machine IronPython runs in a
>> 32-bit process and on a 64-bit machine it runs in a 64-bit process.
> 
> 
> That's probably not exactly true (although I haven't checked).
> 
> When you start a .NET .exe program, the operating system needs to
> decide whether to create a 32-bit or a 64-bit process (assuming the
> processor supports 64-bit mode). 
> 
> The Microsoft .NET commercial framework uses the PE architecture of the

Whats the "Commercial framework" ? I've only come accross 3, the 
standard 32 bit one and 2 64 bit variants. 

> executable to make that decision (or, rather, it doesn't decide at all,
> but the underlying OS decides). The C# compiler (more specifically, the
> assembly linker) offers a choice of setting the .NET architecture to
> Itanium, AMD64, x86, or "any"; people use typically "any". This "any"
> choice is implemented by setting the PE architecture to "any", and then
> indicating to the .NET run-time that any other architecture would be
> fine as well.
> 
> As a consequence, an architecture-any executable launches as a 32-bit
> process on a 64-bit system. 


I just tested, I built a default C# forms app using the "AnyCPU" option
and it ran as a 64 bit app (no *32 in Task Manager), this is on XP64.

I have though installed the AMD64 version of the 2.0 framework and 
AFAICT neither windows update or the Visual Studio installer
will install that by default, you have to go get it your self.

>           To have the executable launch as 64-bit
> code, you must tell csc.exe to create an AMD64 binary (say), which
> then means that the binary won't launch on a 32-bit system. I haven't
> checked, but my guess is that IronPython uses architecture-any
> executables (unless you adjust the build process).

I just started ipy.exe the 1.1 and 2.0B1, both ran as 64 bit processes

    	IronPython 1.1 (1.1) on .NET 2.0.50727.1433
    	Copyright (c) Microsoft Corporation. All rights reserved.
    	>>>

I don't know what happens if you have both 32 bit and 64 bit versions
of the framwork installed (presumably with slightly different minor 
version numbers) as I uninstalled the 32 bit version before I installed the
AMD64 version.

Rob.
-- 
http://www.victim-prime.dsl.pipex.com/



More information about the Python-list mailing list