This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: MemoryError on AIX52
Type: Stage:
Components: Build Versions: Python 2.3
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: loewis, mwh, nnorwitz, richardjmason, sf-robot
Priority: normal Keywords:

Created on 2004-08-03 08:04 by richardjmason, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg21916 - (view) Author: Datranet (richardjmason) Date: 2004-08-03 08:04
I found the orginal problem when trying to send large 
email attachments on AIX 5.2. I tracked the issue down 
to the fact that a string can only grow to a very 
restricted size on AIX 5.2. bin2ascii fails at the pint the 
function tries to join the list togther to form 1 string.

I wrote the following test program to prove the issue:

a = ''
cnt = 0

while cnt < 1024:
 a = a + 'x'
 cnt += 1

c = ''
cnt = 0

while cnt < 1024:
 c = c + a
 cnt += 1

b = ''
cnt2 = 0

while 1:
   b = b + c
   cnt2 += 1
   print cnt2

On AIX 5.2 you get a MemoryError with a cnt2 value of 
42. I can run the test program on all other platforms and 
get a cnt2 value over 150 before stopping to program 

I have tried the binary python 2.2 from the IBM site and 
building python 2.3.4 myself using the gcc from the IBM 
site. Both fail with a cnt2 value of 42.

Can anyone please advise on how to get AIX 5.2 to 
allow single objects to have more memory allocated.
msg21917 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-04 18:09
Logged In: YES 

You need to use a debugger to find the cause of the problem.
What is the string parameter of the MemoryError? This might
give a clue where precisely it is raised.
msg21918 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-08-05 11:59
Logged In: YES 

A way this has happened in the past is calling "malloc(0)",
which is entitled to return NULL and Python then thinks this
is a memory error.  This doesn't seeme especially likely
here, though.  Agree with Martin that you're probably going
to need to use a debugger.
msg21919 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-03 05:23
Logged In: YES 

richardjmason, are you still having this problem?
msg21920 - (view) Author: SourceForge Robot (sf-robot) Date: 2006-03-07 03:25
Logged In: YES 

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40678
2004-08-03 08:04:47richardjmasoncreate