Memory Leak when using winsock.shutdown ?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
priamos
Level 1
Level 1
Posts: 5
Joined: Tue Mar 31, 2009 12:38 pm

Memory Leak when using winsock.shutdown ?

Post by priamos »

I'm using Wine 1.0 on Puppy Linux 3.01

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 permanently 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
Result:
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 ?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Memory Leak when using winsock.shutdown ?

Post by vitamin »

priamos wrote:I'm using Wine 1.0
Upgrade, that's a really old version. Latest version is wine-1.1.18.
priamos
Level 1
Level 1
Posts: 5
Joined: Tue Mar 31, 2009 12:38 pm

Post by priamos »

Sorry for the long delay.

meanwhile I upgraded my linux to wine-1.1.18.
But there is no change.

VmRSS of my application is still permanently increased.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

priamos wrote:VmRSS of my application is still permanently increased.
Then compile Wine from source and run it under valgrind with memory leak detector enabled.
priamos
Level 1
Level 1
Posts: 5
Joined: Tue Mar 31, 2009 12:38 pm

Post by priamos »

Hi Vitamin

my knowledge of linux is still poor. I am not a wine developer.
This is the reason for asking of support at this place.

I can offer the source of my delphi-application for further investigations.

I will support the wine-developers in every way.

But I see no change to solve this issue for myself in a sustainable time frame.
Locked