Thread: Re: [Quickfix-users] Memory Leak - Please help.
Brought to you by:
orenmnero
From: <or...@qu...> - 2008-03-20 14:13:50
|
<html><body><div>We don't know when you are done with the message. You need to call Dispose when you are finished with it.</div> <div> </div> <div>--oren</div> <BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid" webmail="1">-------- Original Message --------<BR>Subject: [Quickfix-users] Memory Leak - Please help.<BR>From: "Sam Smith" <sa...@if...><BR>Date: Thu, March 20, 2008 6:37 am<BR>To: <<a href="mailto:qui...@li...urceforge">qui...@li...urceforge</a>.net><BR><BR>QuickFIX Documentation: <a href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target=_blank>http://www.quickfixengine.org/quickfix/doc/html/index.html</a><BR>QuickFIX Support: <a href="http://www.quickfixengine.org/services.html" target=_blank>http://www.quickfixengine.org/services.html</a><BR><BR> <HR> <o:SmartTagType name="City" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType name="place" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType> <STYLE> #wmMessage st1\:* {behavior:url(#default#ieooui) } </STYLE> <STYLE> #wmMessage /* Style Definitions */ p.MsoNormal, #wmMessage li.MsoNormal, #wmMessage div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} #wmMessage a:link, #wmMessage span.MsoHyperlink {color:blue; text-decoration:underline;} #wmMessage a:visited, #wmMessage span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} #wmMessage span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} #wmMessage @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} #wmMessage div.Section1 {page:Section1;} </STYLE> <DIV class=Section1> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,<o:p></o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I am reasonably new to QuickFix and I have a problem. I have been asked to look at part of a C# application using the .Net QuickFixEngine library.<o:p></o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">My problem is that the application seems to have substantial memory leak.<o:p></o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Looking at the application using a .Net memory profiler, it looks like a lot of QuickFix objects are hanging around in memory. It looks like the .Net code is releasing all references to the objects, but some unmanaged code is retaining a reference.<o:p></o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Am I missing something obvious? Should the developers who wrote it have been calling a .Dispose method or delete or something on these objects? One major source of the leak seems to come from messages that are created by the unmanaged C++ library and passed into our managed code. When our managed code finishes with them they do not seem to get cleaned up.<o:p></o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Please help.<o:p></o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></div> <div><STRONG><B><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Sam Smith</SPAN></FONT></B></STRONG><o:p></o:p></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Developer / Infrastructure</SPAN></FONT><o:p></o:p></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Intelligent Financial Systems</SPAN></FONT><o:p></o:p></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">110 <st1:place w:st="on">St Martin</st1:place>'s Lane<BR><st1:City w:st="on"><st1:place w:st="on">London</st1:place></st1:City><BR>WC2N 4BA</SPAN></FONT><o:p></o:p></div> <div><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Telephone 020 7379 7328</SPAN></FONT><o:p></o:p></div> <div><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Fax 020 7379 7329</SPAN></FONT><o:p></o:p></div> <div><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></div></DIV> <HR> -------------------------------------------------------------------------<BR>This <a href="http://SF.net">SF.net</a> email is sponsored by: Microsoft<BR>Defy all challenges. Microsoft(R) Visual Studio 2008.<BR><a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target=_blank>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a> <HR> _______________________________________________<BR>Quickfix-users mailing list<BR><a onclick="Popup.composeWindow('pcompose.php?sendto=Quickfix-users%40lists.sourceforge.net'); return false;" href="#Compose">Quickfix-users<B></B>@lists.sourceforge.net</A><BR><A href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target=_blank>https://lists.sourceforge.net/lists/listinfo/quickfix-users</a><BR></BLOCKQUOTE></body></html> |
From: <or...@qu...> - 2008-04-04 16:17:42
|
<html><body><div>Sort of. The problem is that memory allocated in C++ does not get reported to the garbage collector, so it doesn't realize how much memory has been allocated. With the code in subversion we add memory pressure to the GC for each allocated message which should help. If you get the latest from svn you can take advantage of it.</div> <div> </div> <div>--oren</div> <BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid" webmail="1">-------- Original Message --------<BR>Subject: Re: [Quickfix-users] Memory Leak - Please help.<BR>From: James P Michels III <jmi...@bl...><BR>Date: Thu, April 03, 2008 3:31 pm<BR>To: <a href="mailto:Qui...@li...">Qui...@li...</a><BR><BR>QuickFIX Documentation: <A href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target=_blank><a href="http://www.quickfixengine.org/quickfix/doc/html/index.html">http://www.quickfixengine.org/quickfix/doc/html/index.html</a></A><BR>QuickFIX Support: <A href="http://www.quickfixengine.org/services.html" target=_blank><a href="http://www.quickfixengine.org/services.html">http://www.quickfixengine.org/services.html</a></A><BR><BR> <HR> -"We don't know when you are done with the message"<BR><BR>Isn't the whole point of a garbage collected runtime to deal with this problem?<BR><BR>OK, I get that its good form to call Dispose, but why is this required?<BR><BR>Doesn't Dispose get called when these objects are being garbage collected?<BR><BR><A class=moz-txt-link-abbreviated onclick="Popup.composeWindow('pcompose.php?sendto=oren%40quickfixengine.org');; return false;" href="mailto:or...@qu..." target=_blank><a href="mailto:or...@qu...">or...@qu...</a></A> wrote: <BLOCKQUOTE cite=mid:200...@em... type="cite"><PRE wrap="">QuickFIX Documentation: <A class=moz-txt-link-freetext href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target=_blank><a href="http://www.quickfixengine.org/quickfix/doc/html/index.html">http://www.quickfixengine.org/quickfix/doc/html/index.html</a></A> QuickFIX Support: <A class=moz-txt-link-freetext href="http://www.quickfixengine.org/services.html" target=_blank><a href="http://www.quickfixengine.org/services.html">http://www.quickfixengine.org/services.html</a></A> </PRE><BR> <HR width="90%" SIZE=4> <BR> <DIV>We don't know when you are done with the message. You need to call Dispose when you are finished with it.</DIV> <DIV> </DIV> <DIV>--oren</DIV> <BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid" webmail="1">-------- Original Message --------<BR>Subject: [Quickfix-users] Memory Leak - Please help.<BR>From: "Sam Smith" <A class=moz-txt-link-rfc2396E onclick="Popup.composeWindow('pcompose.php?sendto=sam%40if5.com');; return false;" href="mailto:sa...@if..." target=_blank><sa...@if...></A><BR>Date: Thu, March 20, 2008 6:37 am<BR>To: <<A onclick="Popup.composeWindow('pcompose.php?sendto=quickfix-users%40lists.sourceforge');; return false;" href="mailto:qui...@li...urceforge" target=_blank moz-do-not-send="true"><a href="mailto:qui...@li...urceforge">qui...@li...urceforge</a></A>.net><BR><BR>QuickFIX Documentation: <A href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target=_blank moz-do-not-send="true"><a href="http://www.quickfixengine.org/quickfix/doc/html/index.html">http://www.quickfixengine.org/quickfix/doc/html/index.html</a></A><BR>QuickFIX Support: <A href="http://www.quickfixengine.org/services.html" target=_blank moz-do-not-send="true"><a href="http://www.quickfixengine.org/services.html">http://www.quickfixengine.org/services.html</a></A><BR><BR> <HR> <o:SmartTagType name="City" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType name="place" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType> <STYLE> #wmMessage #wmMessage st1\:* {behavior:url(#default#ieooui) } </STYLE> <STYLE> #wmMessage #wmMessage /* Style Definitions */ p.MsoNormal, #wmMessage #wmMessage li.MsoNormal, #wmMessage #wmMessage div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} #wmMessage #wmMessage a:link, #wmMessage #wmMessage span.MsoHyperlink {color:blue; text-decoration:underline;} #wmMessage #wmMessage a:visited, #wmMessage #wmMessage span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} #wmMessage #wmMessage span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} #wmMessage #wmMessage @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} #wmMessage #wmMessage div.Section1 {page:Section1;} </STYLE> <DIV class=Section1> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,<o:p></o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I am reasonably new to QuickFix and I have a problem. I have been asked to look at part of a C# application using the .Net QuickFixEngine library.<o:p></o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">My problem is that the application seems to have substantial memory leak.<o:p></o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Looking at the application using a .Net memory profiler, it looks like a lot of QuickFix objects are hanging around in memory. It looks like the .Net code is releasing all references to the objects, but some unmanaged code is retaining a reference.<o:p></o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Am I missing something obvious? Should the developers who wrote it have been calling a .Dispose method or delete or something on these objects? One major source of the leak seems to come from messages that are created by the unmanaged C++ library and passed into our managed code. When our managed code finishes with them they do not seem to get cleaned up.<o:p></o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Please help.<o:p></o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV> <DIV><STRONG><B><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Sam Smith</SPAN></FONT></B></STRONG><o:p></o:p></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Developer / Infrastructure</SPAN></FONT><o:p></o:p></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Intelligent Financial Systems</SPAN></FONT><o:p></o:p></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">110 <st1:place w:st="on">St Martin</st1:place>'s Lane<BR><st1:City w:st="on"><st1:place w:st="on">London</st1:place></st1:City><BR>WC2N 4BA</SPAN></FONT><o:p></o:p></DIV> <DIV><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Telephone 020 7379 7328</SPAN></FONT><o:p></o:p></DIV> <DIV><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Fax 020 7379 7329</SPAN></FONT><o:p></o:p></DIV> <DIV><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></DIV></DIV> <HR> -------------------------------------------------------------------------<BR>This <A href="http://sf.net/" target=_blank moz-do-not-send="true"><a href="http://SF.net">SF.net</a></A> email is sponsored by: Microsoft<BR>Defy all challenges. Microsoft(R) Visual Studio 2008.<BR><A href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target=_blank moz-do-not-send="true"><a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a></A> <HR> _______________________________________________<BR>Quickfix-users mailing list<BR><A href="#Compose" target=_self moz-do-not-send="true" _onclick="Popup.composeWindow('pcompose.php?sendto=Quickfix-users%40lists.sourceforge.net'); return false;"><a href="mailto:Qui...@li...">Qui...@li...</a></A><BR><A href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target=_blank moz-do-not-send="true"><a href="https://lists.sourceforge.net/lists/listinfo/quickfix-users">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a></A><BR></BLOCKQUOTE><PRE wrap=""><HR width="90%" SIZE=4> ------------------------------------------------------------------------- This <a href="http://SF.net">SF.net</a> email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. <A class=moz-txt-link-freetext href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target=_blank><a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a></A></PRE><PRE wrap=""><HR width="90%" SIZE=4> _______________________________________________ Quickfix-users mailing list <A class=moz-txt-link-abbreviated onclick="Popup.composeWindow('pcompose.php?sendto=Quickfix-users%40lists.sourceforge.net');; return false;" href="mailto:Qui...@li..." target=_blank><a href="mailto:Qui...@li...">Qui...@li...</a></A> <A class=moz-txt-link-freetext href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target=_blank><a href="https://lists.sourceforge.net/lists/listinfo/quickfix-users">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a></A> </PRE></BLOCKQUOTE><BR><PRE class=moz-signature cols="72"> </PRE> <HR> -------------------------------------------------------------------------<BR>Check out the new <a href="http://SourceForge.net">SourceForge.net</a> Marketplace.<BR>It's the best place to buy or sell services for<BR>just about anything Open Source.<BR><A href="http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace" target=_blank><a href="http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace">http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace</a></A> <HR> _______________________________________________<BR>Quickfix-users mailing list<BR><A onclick="Popup.composeWindow('pcompose.php?sendto=Quickfix-users%40lists.sourceforge.net'); return false;" href="#Compose">Quickfix-users<B></B>@lists.sourceforge.net</A><BR><A href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target=_blank><a href="https://lists.sourceforge.net/lists/listinfo/quickfix-users">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a></A><BR></BLOCKQUOTE></body></html> |
From: James P M. I. <jmi...@bl...> - 2008-04-03 20:31:35
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> -"We don't know when you are done with the message"<br> <br> Isn't the whole point of a garbage collected runtime to deal with this problem?<br> <br> OK, I get that its good form to call Dispose, but why is this required?<br> <br> Doesn't Dispose get called when these objects are being garbage collected?<br> <br> <a class="moz-txt-link-abbreviated" href="mailto:or...@qu...">or...@qu...</a> wrote: <blockquote cite="mid:200...@em..." type="cite"> <pre wrap="">QuickFIX Documentation: <a class="moz-txt-link-freetext" href="http://www.quickfixengine.org/quickfix/doc/html/index.html">http://www.quickfixengine.org/quickfix/doc/html/index.html</a> QuickFIX Support: <a class="moz-txt-link-freetext" href="http://www.quickfixengine.org/services.html">http://www.quickfixengine.org/services.html</a> </pre> <br> <hr size="4" width="90%"><br> <div>We don't know when you are done with the message. You need to call Dispose when you are finished with it.</div> <div> </div> <div>--oren</div> <blockquote style="border-left: 2px solid blue; padding-left: 8px; margin-left: 8px;" webmail="1">-------- Original Message --------<br> Subject: [Quickfix-users] Memory Leak - Please help.<br> From: "Sam Smith" <a class="moz-txt-link-rfc2396E" href="mailto:sa...@if..."><sa...@if...></a><br> Date: Thu, March 20, 2008 6:37 am<br> To: <<a moz-do-not-send="true" href="mailto:qui...@li...urceforge">qui...@li...urceforge</a>.net><br> <br> QuickFIX Documentation: <a moz-do-not-send="true" href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target="_blank">http://www.quickfixengine.org/quickfix/doc/html/index.html</a><br> QuickFIX Support: <a moz-do-not-send="true" href="http://www.quickfixengine.org/services.html" target="_blank">http://www.quickfixengine.org/services.html</a><br> <br> <hr> <o:SmartTagType name="City" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType name="place" namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType> <style> #wmMessage st1\:* {behavior:url(#default#ieooui) } </style> <style> #wmMessage /* Style Definitions */ p.MsoNormal, #wmMessage li.MsoNormal, #wmMessage div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} #wmMessage a:link, #wmMessage span.MsoHyperlink {color:blue; text-decoration:underline;} #wmMessage a:visited, #wmMessage span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} #wmMessage span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} #wmMessage @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} #wmMessage div.Section1 {page:Section1;} </style> <div class="Section1"> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi,<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I am reasonably new to QuickFix and I have a problem. I have been asked to look at part of a C# application using the .Net QuickFixEngine library.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">My problem is that the application seems to have substantial memory leak.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Looking at the application using a .Net memory profiler, it looks like a lot of QuickFix objects are hanging around in memory. It looks like the .Net code is releasing all references to the objects, but some unmanaged code is retaining a reference.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Am I missing something obvious? Should the developers who wrote it have been calling a .Dispose method or delete or something on these objects? One major source of the leak seems to come from messages that are created by the unmanaged C++ library and passed into our managed code. When our managed code finishes with them they do not seem to get cleaned up.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Please help.<o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></div> <div><strong><b><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Sam Smith</span></font></b></strong><o:p></o:p></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Developer / Infrastructure</span></font><o:p></o:p></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Intelligent Financial Systems</span></font><o:p></o:p></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">110 <st1:place w:st="on">St Martin</st1:place>'s Lane<br> <st1:City w:st="on"><st1:place w:st="on">London</st1:place></st1:City><br> WC2N 4BA</span></font><o:p></o:p></div> <div><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> <o:p></o:p></span></font></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Telephone 020 7379 7328</span></font><o:p></o:p></div> <div><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Fax 020 7379 7329</span></font><o:p></o:p></div> <div><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><o:p> </o:p></span></font></div> </div> <hr> -------------------------------------------------------------------------<br> This <a moz-do-not-send="true" href="http://SF.net">SF.net</a> email is sponsored by: Microsoft<br> Defy all challenges. Microsoft(R) Visual Studio 2008.<br> <a moz-do-not-send="true" href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a> <hr>_______________________________________________<br> Quickfix-users mailing list<br> <a moz-do-not-send="true" onclick="Popup.composeWindow('pcompose.php?sendto=Quickfix-users%40lists.sourceforge.net'); return false;" href="#Compose">Qui...@li...</a><br> <a moz-do-not-send="true" href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a><br> </blockquote> <pre wrap=""> <hr size="4" width="90%"> ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. <a class="moz-txt-link-freetext" href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a></pre> <pre wrap=""> <hr size="4" width="90%"> _______________________________________________ Quickfix-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Qui...@li...">Qui...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/quickfix-users">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a> </pre> </blockquote> <br> <pre class="moz-signature" cols="72"> </pre> </body> </html> |
From: Malinka R. <ael...@gm...> - 2008-04-03 23:23:46
|
yes, but you don't know when the garbage collector will do it's job and therefore there is a memory leak until it does happen, which as i've noticed if you are actually using the system for anything serious it will actually cause the system to run out of memory and crash your programs before it actually does collect the garbage, so yes it is good form to call dispose and yes it will take care of your memory problem, and yes the garbage collector should take care of that however it like most other things isn't the final solution and needs a little help and no this is not a quickfix problem, but a Managed C++ problem in C# ;) On Thu, Apr 3, 2008 at 4:31 PM, James P Michels III < jmi...@bl...> wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > -"We don't know when you are done with the message" > > Isn't the whole point of a garbage collected runtime to deal with this > problem? > > OK, I get that its good form to call Dispose, but why is this required? > > Doesn't Dispose get called when these objects are being garbage collected? > > or...@qu... wrote: > > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > ------------------------------ > > We don't know when you are done with the message. You need to call > Dispose when you are finished with it. > > --oren > > -------- Original Message -------- > Subject: [Quickfix-users] Memory Leak - Please help. > From: "Sam Smith" <sa...@if...> <sa...@if...> > Date: Thu, March 20, 2008 6:37 am > To: <qui...@li...> > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > ------------------------------ > Hi, > > I am reasonably new to QuickFix and I have a problem. I have been asked to > look at part of a C# application using the .Net QuickFixEngine library. > > My problem is that the application seems to have substantial memory leak. > > Looking at the application using a .Net memory profiler, it looks like a > lot of QuickFix objects are hanging around in memory. It looks like the .Net > code is releasing all references to the objects, but some unmanaged code is > retaining a reference. > > Am I missing something obvious? Should the developers who wrote it have > been calling a .Dispose method or delete or something on these objects? One > major source of the leak seems to come from messages that are created by the > unmanaged C++ library and passed into our managed code. When our managed > code finishes with them they do not seem to get cleaned up. > > Please help. > > *Sam Smith* > Developer / Infrastructure > Intelligent Financial Systems > 110 St Martin's Lane > London > WC2N 4BA > > Telephone 020 7379 7328 > Fax 020 7379 7329 > > ------------------------------ > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------ > _______________________________________________ > Quickfix-users mailing list > Qui...@li... <#119160025b7bb85b_Compose> > https://lists.sourceforge.net/lists/listinfo/quickfix-users > > ------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008.http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > ------------------------------ > > _______________________________________________ > Quickfix-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/quickfix-users > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users > > |