This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author coderforlife
Recipients amaury.forgeotdarc, belopolsky, coderforlife, ezio.melotti, loewis, meador.inge
Date 2013-01-04.22:24:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357338279.55.0.0365938977126.issue16865@psf.upfronthosting.co.za>
In-reply-to
Content
Okay, so I tested in Linux (CentOS 6.3) which has Python 2.6.6 64-bit. It works. So the Windows 2.7.3 64-bit version is bugged. I was able to perform the c_char * long(32*1024*1024*1024) [the highest value I tried] and it worked fine. The Linux machine I tested this on was limited in RAM so ran into memory issues, but I was able to allocate a 2GB buffer with create_string_buffer().

So all in all, it is a bug. Works with Linux Python v2.6.6 64-bit but not Windows Python v2.7.3.

The ctypes documentation does not mention an upper limit so I would assume that it should be based on the maximum memory allocation of the underlying system (e.g. Windows 32-bit can't allocate more than 2GB, but Windows 64-bit should be very very large).
History
Date User Action Args
2013-01-04 22:24:39coderforlifesetrecipients: + coderforlife, loewis, amaury.forgeotdarc, belopolsky, ezio.melotti, meador.inge
2013-01-04 22:24:39coderforlifesetmessageid: <1357338279.55.0.0365938977126.issue16865@psf.upfronthosting.co.za>
2013-01-04 22:24:39coderforlifelinkissue16865 messages
2013-01-04 22:24:39coderforlifecreate