64-bit Python?

Kragen Sitaker kragen at pobox.com
Thu Jun 6 13:30:21 EDT 2002


loewis at informatik.hu-berlin.de (Martin v. Löwis) writes:
> I believe there is another limit: the maximum length of a string,
> list, or tuple is 2**31-1 on 64-bit platforms where a C int is 4
> bytes. That, in particular, includes mmapped objects as well.

Yes, this is correct.  Even the buffer interface, which my
arrayfrombuffer package[0] uses to provide access to mmapped files as
Numeric arrays inexplicably uses int instead of size_t.

The problem is that all of the 64-bit platforms I have access to
(various Linuxes on Alpha and IA-64, Tru64 on Alpha) have 4-byte ints
and 8-byte longs, at least by default.  This is called "LP64": longs
and pointers are 64, but ints are 32, so all the code that assumes
ints are 32 will continue to work.

[0] http://pobox.com/~kragen/sw/arrayfrombuffer




More information about the Python-list mailing list