python startup memory size and memory leak
jerk@163
jerk at 163.net
Mon Jul 9 03:46:42 EDT 2001
Hello jerk,
Monday, July 09, 2001, 9:43:09 AM, you wrote:
j1> Hello python-list,
j1> my app is a server that receive client's request in xml and query the mysql
j1> database to response to client,I use python 2.0 on linux(2.2.13),with expat 1.95
j1> statically link into python and MySQLdb 0.3.5,as I am not so familary with xml
j1> so I didn't call unlink() on those created xml document before they are
j1> deleted,this is definitely a leak,right?
j1> but this leak may show different behavior with different startup
j1> environment.if all py is compiled into pyc and then start my app,top shows
j1> that it takes about 2.8M memory at first,as client requests comes,memory goes up
j1> very fast.then if I touch one of those py files and start my app again,top shows
j1> that it takes about 5M memory at first,as client requests comes,memory goes up
j1> very slow(althought it still leaking).
j1> I don't know why python startup size is different when I just touching
j1> one of those py files but seems it related to python compilation.
there is one more different behavior in two different startup
environment,there is a readline() call on a socket which will block when no data
send to server,with 2.8M memory startup python when I ctrl-C when readline is
waiting for input,instead of catching the keyboardInterrupt,python seg fault
with just one message "Python Fatal Error, Interpreter not initialized( version
mismatch)",but with the 5M memory startup python,it just catch the
keyboardInterrupt and exit normally
j1> Best regards,
j1> jerk mailto:jerk at 163.net
Best regards,
My ICQ Number is:41597368
jerk mailto:jerk at 163.net
More information about the Python-list
mailing list