memory bug in win32pdh

vincent delft vdelft at itmasters.com
Wed Jun 20 08:56:22 EDT 2001


I'm written a small python script to get, each seconds, the list of
process running on a W2K box.  During that develoment I've founded a
strange behaviour.

I've isolated the problem to 1 simple command.

Try the following code, and look in your "Task Manager", the "memory
usage" for your python process will grow and grow.  Within 10 minutes
the "memory usage" grow up to 800kb.


import time
import win32pdh
while 1:
      win32pdh.EnumObjectItems(None,None,'Process',
win32pdh.PERF_DETAIL_WIZARD)
      time.sleep(1)


If someone have a solution ....

Thanks




More information about the Python-list mailing list