<div dir="ltr">On Sat, Mar 2, 2013 at 12:56 PM, Alexander Potapenko <span dir="ltr"><<a href="mailto:glider@google.com" target="_blank">glider@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"></p><div class="im"><br>
On Mar 2, 2013 3:18 AM, "reed kotler" <<a href="mailto:rkotler@mips.com" target="_blank">rkotler@mips.com</a>> wrote:<br>
><br>
> Does LLVM try and make sure that all memory is freed before compiler exit?<br>
><br>
> For example, It seems like the ARM constant pool code that I'm reading will leave a lot of un-deallocated memory.<br>
><br>
> Maybe I'm missing something here.<br></div>
Is it that necessary to have the compiler free everything?<br>
 It usually makes sense to ensure all the allocated memory is still reachable (i.e. there are no uncontrollable leaks), but if there are pointers to that memory it should be fine to leave that memory unfreed to speed up the process shutdown.</blockquote>
<div><br></div><div style>It can be very important if you're using llvm/clang as a library instead of a stand-alone process.  If a compilation does not free all of its memory and is repeatedly invoked, this can lead to increasing memory usage.  I'm not saying this is the case for the ARM constant pool (I don't know).</div>
<div style><br></div><div style>I've recently ran into an issue where the PassRegistry is not completely cleaned up on exit.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>

> Reed<br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div><p></p>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div></div>