New submission from Sébastien Sablé <sa...@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
start_process
unset LDR_CNTRL

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 <rep...@bugs.python.org>
<http://bugs.python.org/issue11212>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to