473,657 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

out of memory error on python 2.5.4 XP

2 New Member
Hello,
I hope someone can help.
I am using Python 2.5.4 (under python(x,y) umbrella) on XP SP3, and running a grammatical evolution program that runs recursions on equations that grow via nested recursive loops: the program is PonyGE from the google repository: I tried contacting authors to no avail.

The program works, but after a small number of populations, it gets a 'dreaded' memory error if the equations grow too large. If I run it in Ipython I get an additional clue, which is s_push: parser stack overflow.

An example equation that was halted with this error is:

Expand|Select|Wrap|Line Numbers
  1.   return (4 * (2 - (4 * ((((2 + (2 + 0)) + 3) * (((4 + 3) - ((((2 * (3 * 1)) + (4 - (((0 - 4) + (((4 * (((((3 + 0) + (0 + 2)) + 3) * (((0 - 3) * 3) + (5 - (4 + (2 + 1))))) - 3)) - 3) * 5)) + 1))) * 4) - 2)) + 4)) + 1))))
  2. XXXeval_or_exec_outputXXX=sum([f(x) for x in range(10)]); 8264400


I did some research on other people with this problem, and they said the
parser.c MAXSTACK needed to be upped. Problem is I have no parser.c in my python directory. The other weird thing is the program halts here and only uses 15M of RAM out of 1.5G on my system (3.3Ghz AMD).

One other hint is someone else ran it on linux with no problems. They mentioned it might have to do with the way xp allocates memory vs linux.
Can anyone help?

Thanks so much.

P.S. Sorry, is there a sticky on how to insert code tags? I tried <code></code> and it didn't enclose any code.
Dec 18 '09 #1
2 3366
bvdet
2,851 Recognized Expert Moderator Specialist
Thanks for trying to add code tags. The guidelines for posting questions can be found here.
Dec 19 '09 #2
annon desu
1 New Member
Did you ever figure this out? I get the same problem trying to down load a file of about 1/2 a GB but I have plenty of RAM etc on my machine
Sep 27 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3885
by: Jane Austine | last post by:
>Jane Austine wrote: >>>>from Tkinter import * >>>>>r=Tk() >>>>>b=Button(r,text='Quit',command=r.quit) >>>>>b.pack() >>>>>r.mainloop() >> >> >> And when I press the "Quit" button the mainloop exits. After that, if
0
1321
by: John Owens | last post by:
I am running the IMAP4 example in the documentation: http://www.python.org/doc/lib/imap4-example.html with two small changes (different username, comment out print statement). The inbox I am accessing is 42 MB and has 80-someodd messages, so the messages are fairly big (all of them have attachments). When I run this program, I get a malloc error. Now, I'm really new to python programming, but it was my understanding that memory...
5
4430
by: Claudio Grondi | last post by:
Background information: --------------------------------- in order to monitor mainboard sensory data as fan speeds, temperatures, applications like SpeedFan http://www.almico.com/speedfan.php or MBM http://mbm.livewiredev.com/ can be used. Both of the mentioned apps expose data got from the hardware in a shared memory area.
18
2927
by: diffuser78 | last post by:
I have a python code which is running on a huge data set. After starting the program the computer becomes unstable and gets very diffucult to even open konsole to kill that process. What I am assuming is that I am running out of memory. What should I do to make sure that my code runs fine without becoming unstable. How should I address the memory leak problem if any ? I have a gig of RAM. Every help is appreciated.
20
9346
by: mariano.difelice | last post by:
Hi, I've a big memory problem with my application. First, an example: If I write: a = range(500*1024) I see that python process allocate approximately 80Mb of memory.
11
7583
by: Hari Sekhon | last post by:
I do import zipfile zip=zipfile.ZipFile('d:\somepath\cdimage.zip') zip.namelist() then either of the two: A) file('someimage.iso','w').write(zip.read('someimage.iso'))
11
3945
by: seberino | last post by:
Suppose a C extension locally built an array of PyObject* 's as follows... my_array = malloc(n * sizeof(PyObject*)); for (i = 0; i < n; i++) { my_array = PyList_New(0); } Q1: Must I do a Py_DECREF(my_array) on all elements before exiting this C extension function? (What if
2
2260
by: Chris | last post by:
I have a Bayesian simulation package that keeps running into memory allocation problems. I have a feeling this has something to do with Python (2.5.1.1) not freeing memory. The program essentially iterates n times, each time proposing new arrays (numpy) of values that are evaluated using statistical likelihoods. All variables in the loop are re-assigned at each iteration, so there should not be a leak. Nevertheless, at approximately the...
3
2525
by: Blubaugh, David A. | last post by:
To All, I was wondering if it was possible to utilize python to share a memory resource between a linux and windows system?? It should be stated that both the Linux (CENTOS 5) and windows are physically located on the same computer. Is any of this possible?
0
1504
by: Blubaugh, David A. | last post by:
Diez, What you have said is extremely concerning. I am now using VMware. With Linux as the Master and windows as the guest operating system. I was wondering if you have ever had to develop a share memory resource between Linux and windows within a Vmware setup?
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.