Hi Yohann,<br><br>It still has memory leak if you use ST(single-thread). You could test it by some tools like "Boundschecker". 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
<span style="font-size: 10.5pt; font-family: "Times New Roman";"><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 <<a href="mailto:yohann.pitrey@ens.insa-rennes.fr">yohann.pitrey@ens.insa-rennes.fr</a>>:</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't use threads anymore (i erased thread stuff from the code),<br>do you believe it'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>> Hi, everyone<br>><br>> I found huge memory leak in the x264. There are at least 3 positions<br>> which has memory leak. Such as below:
<br>><br>> 1. The function "x264_mb_analyse_load_costs" in file " analyse.c". Here<br>> only "malloc" the buffer for the parameter "*p_cost_mv[52]". But not<br>> free them in the end. It should be freed at the function
<br>> "x264_encoder_close".<br>><br>> 2. The parameter "i_refs" in the function "x264_macroblock_cache_end"<br>> should be computed like in the "x264_macroblock_cache_init". Otherwise
<br>> it will cause memory leak.<br>><br>> 3. Not all the new "x264_frame_t" are deleted at the end of encoding. So<br>> it cause huge memory leak.<br>><br>> I have corrected them. But I am unable to write patch file. So I had to
<br>> put my changed project for windows. My way is not the best. Somebody can<br>> reference from it to generate the better way. Please put in your patch<br>> file if you have better ideas.<br>><br>> Thank you very much.
<br>><br>><br>><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><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>