On Sat, May 10, 2014 at 11:56 PM, Ross Gayler <r.gay...@gmail.com> wrote: > > Hi, > > I want to install Python on a PC with 16GB of RAM and the 64 bit version of > Windows 7. > I want Python to be able to use as much as possible of the RAM. > > When I install the 64 bit version of Python I find that sys.maxint == 2**31 > - 1 > Whereas the Pythpon installed on my 64 bit linux system returns sys.maxint == > 2**63 - 1. >
That comes from the underlying C implementation. 64-bit MSVC still has long int as 32-bit. You need to specify long long int to get a 64-bit number even on a 64-bit compiler. Microsoft is a little nuts on the backwards compatiblity. > It looks to me as though 32 and 64 bit versions of Python on 64 bit Windows > are both really 32 bit Python, differing only in how they interact with > Windows. So I wouldn't expect 64 bit Python running on 64 bit Windows to > allow the large data struictures I could have with 64 bit Python running on > 64 bit linux. > > Is that true?I have spent a couple of hours searching for a definitive > description of the difference between the 32 and 64 bit versions of Python > for Windows and haven't found anything. > long int (the size of an integer) != size_t (the size of an object). 64-bit Python still uses 64-bit pointers so it can still address more than 4GB of memory. It just rolls over into longs after 32-bit int max instead of after 64-bit int max. -- https://mail.python.org/mailman/listinfo/python-list