[cfe-dev] What clang should do when memory is exhausted?

Ted Kremenek kremenek at apple.com
Fri Apr 27 13:29:26 PDT 2012


On Apr 27, 2012, at 7:43 AM, Domagoj Saric <domagoj.saric at littleendian.com> wrote:

> One of the major reasons Xcode 4 was completely unusable on 32 bit machines with 
> C++ projects was because libclang that was running indexing in the background 
> would quickly hog all RAM and simply crash...

I'm not going to discuss the details of Xcode indexing, but in general there are other solutions to this problem.  Throttling back the amount of concurrent work in low-memory situations is another potential direction (e.g., parsing fewer translation units simultaneously in low memory situations).  I agree that recovering from low memory situations is also desirable, but trying to avoid it gracefully in a proactive fashion is probably far simpler.  If we are in a low memory situation, we are likely going to swap, and performance hits a wall even if we could recover.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120427/74dd40e9/attachment.html>


More information about the cfe-dev mailing list