python startup memory size and memory leak

jerk@163 jerk at 163.net
Sun Jul 8 21:43:09 EDT 2001


Hello python-list,

        my app is a server that receive client's request in xml and query the mysql
database to response to client,I use python 2.0 on linux(2.2.13),with expat 1.95
statically link into python and MySQLdb 0.3.5,as I am not so familary with xml
so I didn't call unlink() on those created xml document before they are
deleted,this is definitely a leak,right?
        but this leak may show different behavior with different startup
environment.if all py is compiled into pyc and then start my app,top shows
that it takes about 2.8M memory at first,as client requests comes,memory goes up
very fast.then if I touch one of those py files and start my app again,top shows
that it takes about 5M memory at first,as client requests comes,memory goes up
very slow(althought it still leaking).
        I don't know why python startup size is different when I just touching
one of those py files but seems it related to python compilation.


Best regards,
 jerk                          mailto:jerk at 163.net





More information about the Python-list mailing list