Memory leak in Python

diffuser78 at gmail.com diffuser78 at gmail.com
Tue May 9 09:50:43 EDT 2006


I am using Ubuntu Linux.

My program is a simulation program with four classes and it mimics bit
torrent file sharing systems on 2000 nodes. Now, each node has lot of
attributes and my program kinds of tries to keep tab of everything. As
I mentioned its a simulation program, it starts at time T=0 and goes on
untill all nodes have recieved all parts of the file(BitTorrent
concept). The ending time goes to thousands of seconds. In each sec I
process all the 2000 nodes.

Psuedo Code

Time = 0
while (True){
        For all nodes in the system{
                Process + computation
        }
       Time++
       If (DownloadFinished == True) exit;
}


Dennis Lee Bieber wrote:
> On 8 May 2006 18:15:02 -0700, diffuser78 at gmail.com declaimed the
> following in comp.lang.python:
>
> > 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.
> >
> 	Does the memory come back after the process exits?
>
> 	You don't show any sample of code or data... Nor do you mention what
> OS/processor is involved.
>
> 	Many systems do not return /allocated/ memory to the OS until the
> top-level process exits, even if the memory is "freed" from the
> viewpoint of the process.
> --
> 	Wulfraed	Dennis Lee Bieber		KD6MOG
> 	wlfraed at ix.netcom.com		wulfraed at bestiaria.com
> 		HTTP://wlfraed.home.netcom.com/
> 	(Bestiaria Support Staff:		web-asst at bestiaria.com)
> 		HTTP://www.bestiaria.com/




More information about the Python-list mailing list