I wrote an application with a http-server and a socket-server for windows
and I like to use this on linux. (Delphi with Indy components)
My application works fine on windows without any memory leak.
But running with wine the VmRSS-value is continual increased.
I use following bash-script to check this:
Code: Select all
while true; do cat /proc/"`pidof tcpc`"/status|grep -E "VmRSS";sleep 5; done
VmRSS: 4084 kB
VmRSS: 4084 kB
VmRSS: 4084 kB
VmRSS: 4084 kB
VmRSS: 4104 kB
VmRSS: 4104 kB
VmRSS: 4108 kB
VmRSS: 4108 kB
VmRSS: 4108 kB
VmRSS: 4108 kB
VmRSS: 4108 kB
VmRSS: 4112 kB
VmRSS: 4112 kB
....
If I stop the http-requests of the client-application the VmRSS-growth of
my server-application stops too.
I found, that opening and closing of a tcp-socket is the cause of memory growth.
I detected that the api-function (used by indy components)
winsock.shutdown(FLastsocket,1);
is the cause of the memory leak.
All other functions of my application work fine.
Is there any solution ?