Select to view content in your preferred language

Geoprocessing Script memory leak?

681
1
04-16-2010 12:17 PM
CurtisRuck
New Contributor III
Is there any way to debug geoprocessor memory leaks? 

I am scripting pyramid generation for a raster catalog (more than one million datasets) in 9.3.1 and after 6000 raster datasets i'm using 620mb of ram, after 6500 raster datasets i'm using 667mb, and when it hits 2gb ram usage it crashes since its a 32bit app.

Any ideas?  My catalog is in a filegeodatabase as an unmanaged raster catalog.
0 Kudos
1 Reply
AndrewChapkowski
Esri Regular Contributor
you can use Heapy
http://guppy-pe.sourceforge.net/

This will help you examine memory leaks.

Here is some code to get you started:
from guppy import hpy
h = hpy()
print h.heap()

You can also try this:
http://bruynooghe.blogspot.com/2008/12/finding-memory-leaks-in-python.html
or this:
http://mg.pov.lt/blog/hunting-python-memleaks

Happy Memory Leak Hunting!
0 Kudos