Jeffrey Bush added the comment:

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).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16865>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to