<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 28, 2017 at 10:10 AM, David Barto <span dir="ltr"><<a href="mailto:barto@cambridgesemantics.com" target="_blank">barto@cambridgesemantics.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">This is part of an in-memory system (no swap space configured) so RSS would match the AS size for this use case. From what I read about RSS and AS for MacOS and Linux.<div><br></div><div>Why did it lock up, why not throw the exception and exit?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><span class="m_-7213370958083013744Apple-tab-span" style="white-space:pre-wrap"></span></div></font></span><div><div><div><div class="h5"><div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div></div></div></blockquote></div></div></div></div></div></div></blockquote><div><br></div><div>Dunno, it seems like the OS is driving now and it's not immediately clear to me why that system call wouldn't yield either success or failure.  But clang is asking for a resource (more memory), and I've seen those stall before.  My experience with linux (may or may not be applicable) leads me to believe that the system is perhaps resource-constrained and your task is pending while it tries to free up those resources.</div><div><br></div><div>RLIMIT_AS and RLIMIT_RSS are distinct on linux, I guess I am a little surprised to see that they're not on MacOS.</div><div><br></div><div>In any case, the most likely culprit is your setrlimit.  If I were you I would take clang out of the loop entirely and write a test program that does allocations just like the ones clang does (various sized mallocs, you could try profiling to get a ballpark histogram).  I would be surprised if you don't see the same behavior.</div><div><br></div><div>-Brian</div></div>
</div></div>