[New-bugs-announce] [issue11212] Python memory limit on AIX

Sébastien Sablé report at bugs.python.org
Mon Feb 14 16:31:15 CET 2011

New submission from Sébastien Sablé <sable at users.sourceforge.net>:

On AIX, executables are compiled by default so that they cannot allocate more than 256MB of memory.

This is not enough in some cases; for example this is not enough to get the Python test suite to run completely.

As explained in IBM documentation:

By default each program gets one segment register (see 2.24) for its
data segment. As each segment register covers 256 MB, any calls to
malloc more will fail. Also programs that declare large global or static
arrays may fail to load. To allocate more segment registers to your
program, use the linker option -bmaxdata to specify the number of bytes
you need in the data segment as follows:

cc -o myprog -bmaxdata:0x20000000 myprog.c

The example above would allocate an additional segment register to allow
for 512MB of data.

export LDR_CNTRL=MAXDATA=0x20000000

Marking An Executable For Large Page Use
The XCOFF header in an executable file contains a new flag to indicate that the program wants to use
large pages to back its data and heap segments. This flag can be set when the application is linked by
specifying the -blpdata option on the ld command. The flag can also be set or cleared using the ldedit
command. The "ldedit -blpdata filename" command sets the large page data/heap flag in the specified
file. The "ldedit -bnolpdata filename" clears the large page flag. The ldedit command may also be used
to set an executable's maxdata value

components: Build
messages: 128553
nosy: sable
priority: normal
severity: normal
status: open
title: Python memory limit on AIX
versions: Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list