Hi Yohann,<br><br>It still has memory leak if you use ST(single-thread). You could test it by some tools like &quot;Boundschecker&quot;. The MT has more memory leak than ST has.<br><br>I am very busy this day. I am sorry to put unfinished work. So I think someone could optimize the way first. Then&nbsp;
<span style="font-size: 10.5pt; font-family: &quot;Times New Roman&quot;;"><span style=""></span><span lang="EN-US">put in patch file if you have better ideas. Welcome for the discussion.</span></span><br><br><div><span class="gmail_quote">
2007/11/26, Yohann Pitrey Helpiquet &lt;<a href="mailto:yohann.pitrey@ens.insa-rennes.fr">yohann.pitrey@ens.insa-rennes.fr</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br> From what i saw, this memory leak seems to occur only when you use threads. Is<br>that right? I don&#39;t use threads anymore (i erased thread stuff from the code),<br>do you believe it&#39;s worth the time to merge modifications from your patch?
<br><br>Thanks a lot!<br><br>Yohann.<br><br><br><br>alexander tian a écrit :<br>&gt; Hi, everyone<br>&gt;<br>&gt; I found huge memory leak in the x264. There are at least 3 positions<br>&gt; which has memory leak. Such as below:
<br>&gt;<br>&gt; 1. The function &quot;x264_mb_analyse_load_costs&quot; in file &quot; analyse.c&quot;. Here<br>&gt; only &quot;malloc&quot; the buffer for the parameter &quot;*p_cost_mv[52]&quot;. But not<br>&gt; free them in the end. It should be freed at the function
<br>&gt; &quot;x264_encoder_close&quot;.<br>&gt;<br>&gt; 2. The parameter &quot;i_refs&quot; in the function &quot;x264_macroblock_cache_end&quot;<br>&gt; should be computed like in the &quot;x264_macroblock_cache_init&quot;. Otherwise
<br>&gt; it will cause memory leak.<br>&gt;<br>&gt; 3. Not all the new &quot;x264_frame_t&quot; are deleted at the end of encoding. So<br>&gt; it cause huge memory leak.<br>&gt;<br>&gt; I have corrected them. But I am unable to write patch file. So I had to
<br>&gt; put my changed project for windows. My way is not the best. Somebody can<br>&gt; reference from it to generate the better way. Please put in your patch<br>&gt; file if you have better ideas.<br>&gt;<br>&gt; Thank you very much.
<br>&gt;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; x264-devel mailing list<br>&gt; <a href="mailto:x264-devel@videolan.org">
x264-devel@videolan.org</a><br>&gt; <a href="http://mailman.videolan.org/listinfo/x264-devel">http://mailman.videolan.org/listinfo/x264-devel</a><br><br><br>_______________________________________________<br>x264-devel mailing list
<br><a href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br><a href="http://mailman.videolan.org/listinfo/x264-devel">http://mailman.videolan.org/listinfo/x264-devel</a><br></blockquote></div><br>