[cfe-dev] ld taking too much memory to link clang

Andre Cunha andrecunha.usp at gmail.com
Tue Jan 22 11:05:31 PST 2013


It makes sense for me that the kernel might be killing the wrong process
when ld makes the system run out of memory. Searching the Web about the
OOM-killer, I found this (from http://linux-mm.org/OOM_Killer):

*Any particular process leader may be immunized against the oom killer if
the value of its /proc/<pid>/oom_adj is set to the constant OOM_DISABLE
(currently defined as -17). *

I'll try linking clang again and checking if OOM-killing is disabled for
ld. If so, I believe this is likely to be the reason for the problem.


On 22 January 2013 16:24, Karen Shaeffer <shaeffer at neuralscape.com> wrote:

> On Tue, Jan 22, 2013 at 02:39:20PM +0000, Renato Golin Linaro wrote:
> > Gold in my case is still not helping, since I leave many programs open at
> > once and swap gets crazy in the last linking steps of the debug
> binaries...
> >
> > Funny, though, that it starts swapping before it actually hits the
> maximum
> > memory, and I think that's why Linux is not killing the process just yet,
> > but it is flogging the usability of the desktop.
> >
> > --renato
>
> Hi,
> The kernel reserves a chunk of memory for itself as working space to dig
> out
> of an out-of-memory situation. So it will swap before running out of
> memory,
> especially if there is a large spike in memory usage at that point where
> out-of-memory is approached.
>
> This out-of-memory killer has a long history of perplexing folks, because
> it
> isn't easy to do the right thing in all cases. The kernel might be killing
> the
> wrong processes? Something to verify one way or the other.
>
> enjoy,
> Karen
> --
> Karen Shaeffer
> Neuralscape, Mountain View, CA 94040
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



-- 
Andre Cunha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130122/2343aeee/attachment.html>


More information about the cfe-dev mailing list