[issue9526] 2 GB limit in array module

Martin Frith report at bugs.python.org
Fri Aug 6 04:20:54 CEST 2010


New submission from Martin Frith <martin at cbrc.jp>:

The array module does not seem to work for arrays > 2 GB.

>>> import sys, array
>>> sys.maxsize
9223372036854775807
>>> x = array.array('c', ('a' for i in xrange(300000000)))
(seems to work OK)
>>> x = array.array('c', ('a' for i in xrange(3000000000)))
(runs forever: memory usage increases to 2GB and then stops)

I think the cause is: casting to int in arraymodule.c, in array_iter_extend() and array_append().

My uname -a:
Linux c016 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

----------
components: Extension Modules
messages: 113061
nosy: mcfrith
priority: normal
severity: normal
status: open
title: 2 GB limit in array module
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9526>
_______________________________________


More information about the Python-bugs-list mailing list