New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python should use 3GB Address Space on Windows #43034
Comments
Python runs fine using a 3GB address space on 32bit To take advantage of this feature, Python should be For details, please refer to: http://msdn.microsoft.com/library/en- As most Windows users just use pre-built executables, Best regards, |
Logged In: YES Microsoft claims that the switch does not negatively affect Can you offer a patch? |
Logged In: YES MS also says "However, the file cache, paged pool, and |
Logged In: YES Tim, the /LARGEADDRESSAWARE flag just specifies whether It does not cause Windows to provide the 3GB address space, In other words, it is an enabling declaration, not a Josiah, I don't compile on Windows, hence cannot provide a Brgds, Martin |
Logged In: YES Thanks, Martin. Raymond Chen notes that some C code can http://blogs.msdn.com/oldnewthing/archive/2004/08/12/213468.aspx I doubt that core Python's C has 2GB assumptions, but |
Unless anyone plans on a patch I say we let this go. As of 2.5 we provide x64 installers, and with most users running on 64-bit OS'es I would say it's better to suggest they use a 64-bit compiled Python to obtain an even larger addressable space. Of course, not all users are on 64-bit, but it'll take some work and tests for this to be considered for 3.2. |
The patch is a simple tweak to the Visual Studio project's compiler settings. Seems quite innocuous, nothing broke in the Python harness or our internal harnesses (at ESRI) by enabling this. |
I'm rejecting this as "won't fix". Users having the underlying problem (i.e. need more than 2GB of heap) really should switch to a 64-bit installation. The risk of something breaking is just not worth it. That testing showed no issues is not convincing at all. Existing test suites will likely not exercise critical code paths wrt. this change, which are issues caused by some objects potentially exceeding 2GB in 32-bit mode. This might not even be Python core objects, but may be objects in an extension module. |
Martin, we're running with this for years and with many extensions modules, without an issue. What is 64-bit safe should be 32-bit safe, not only 31-bit safe. But you're right, this is not a proof, and we have switched to 64-bit ourselves. |
Not here. Python uses "signed size_t" for various lengths and sizes. |
I would like to see this reopened: we have a very large class of users that are not ready to entirely port to 64-bit and need this now. When running a Python script from within a desktop application (which embeds Python and has /LARGEADDRESSAWARE set) or outside in Python.exe (which does not) results in the outputs from the tools calling out to these 32 bit libraries to produce different outputs because the amount of data they are able to allocate and process at the same time. The same Python script that gives correct output on a large dataset in this desktop app will not yield the same quality of results when run overnight as a stand-alone Python script. Essentially this discounts Python scripts as an option for automation in this case. I understand that yes, applications still cannot allocate more CONTIGUOUS memory, but this is not a regression if it continues to be so. Allowing the process to allocate more TOTAL memory is a net benefit, especially on on complex software systems that can't simply be rebuilt in 64 bit mode due to third-party restraints (tied to a specific library version, lack of access to source, lengthy software approvals processes, etc.) |
Well, if you already embed Python in your application, you can probably also embed it in a simple console application which will enable automation, can't you? |
And I remain -1 to such requests. You can appeal to that by writing a Alternatively, just provide these users with binaries that you built
It would be a regression if Python started crashing because of that |
IMVU's downloadable client is built atop CPython. 80% of our users use 32-bit Windows and 20% use 64-bit Windows. We do not intend to provide 64-bit builds of our application for many of the same reasons sketched out in http://blogs.msdn.com/b/ricom/archive/2009/06/10/visual-studio-why-is-there-no-64-bit-version.aspx Process address space is one of our key bottlenecks: limiting the amount of cache we can mmap in, various runtime heap reserves, etc. For those 20% of users running 64-bit Windows, /LARGEADDRESSAWARE would give 32-bit Python access to 4 GB of address space, which would certainly help them. The other reason not to use 64-bit binaries is that they consume significantly more memory and cache, especially because Python is so pointer-heavy. In the meantime, we can use editbin /LARGEADDRESSAWARE to modify the shipped .exes. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: