Followup : Huuuuge memory leak (third attempt)

jurgen.defurne at philips.com jurgen.defurne at philips.com
Mon Feb 19 09:49:38 EST 2001


Is your box Win NT or Win95 ?
Are you using Task Manager ?

I monitor my processes and the used memory. It is true,
the memory of the process does not increase, but the used
memory does. That is why I more and more suspect that it
is an OS problem with the spawn calls.

Jurgen




fredrik at pythonware.com@SMTP at python.org on 19/02/2001 15:35:55
Please respond to fredrik at effbot.org@SMTP 
Sent by:	python-list-admin at python.org
To:	python-list at python.org@SMTP
cc:	 
Subject:	Re: Followup : Huuuuge memory leak (third attempt)
Classification:	

jurgen.defurne at philips.com wrote:
> Since in the second version, the main loop sleeps long enough to make
> sure that the spawned script is finished before another one is released,

doesn't look like it's sleeping:

if len(sys.argv) == 1:
    while 1:
        # Doesn't matter if P_NOWAIT or P_DETACH, tried 'em both
        os.spawnl(os.P_DETACH, 'd:\\python20\\python', 'python', 'cron.py', 'check')
        # no sleep here
elif sys.argv[1] == 'check':
    pass

adding a time.sleep(0.2) makes it work better -- and after 10 minutes,
the main process hasn't grown a single byte on my box...

Cheers /F


--
http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list