poll function don't release all windows handle / possible memory leak
Thomas Stalder
cygwinml@gmail.com
Mon Apr 18 10:31:00 GMT 2011
Hello,
I have found that poll function don't release all windows handle (with
network socket) and generate memory leak.
I have made a simple application to reproduce the problem (server.c).
I compile the application :
$ gcc server.c -o serverleak
$ gcc -Dnoleak server.c -o servernoleak
--------------------------------
How to reproduce the problem
1) I execute the application :
$ ./serverleak
2) I execute the windows taskmanager and I add the column "Handle"
(see http://www.netsolux.ch/cyg/1.gif)
3) I execute on windows "telnet 127.0.0.1 8082" and I press a key on
the terminal
after I see the number of handles (see
http://www.netsolux.ch/cyg/2.gif). I have 137
4) I execute on windows "telnet 127.0.0.1 8082" and I press a key on
the terminal
after I see the number of handles (see
http://www.netsolux.ch/cyg/3.gif). I have 138
5) I execute on windows "telnet 127.0.0.1 8082" and I press a key on
the terminal
after I see the number of handles (see
http://www.netsolux.ch/cyg/4.gif). I have 139
---------------------------
After each call of poll function, I have 1 handle not released.
This problem don't occurr with servernoleak.
Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 66290 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20110418/8d8f5f8d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.c
Type: text/x-csrc
Size: 5840 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20110418/8d8f5f8d/attachment.bin>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list