Memory leak in Python

S

Serge Orlov

I ran simulation for 128 nodes and used the following

oo = gc.get_objects()
print len(oo)

on every time step the number of objects are increasing. For 128 nodes
I had 1058177 objects.

I think I need to revisit the code and remove the references....but how
to do that. I am still a newbie coder and every help will be greatly
appreciated.

The next step is to find out what type of objects contributes to the
growth most of all, after that print several object of that type that
didn't exist on iteration N-1 but exist on iteration N
 
S

Stephen Kellett

The next step is to find out what type of objects contributes to the
growth most of all,

Shame you aren't on Windows, as Python Memory Validator does all of
this.
after that print several object of that type that
didn't exist on iteration N-1 but exist on iteration N

And this, but for garbage collection generations.

Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top