Raimo Niskanen wrote:
> On Wed, Oct 05, 2016 at 12:34:42PM -0400, Ted Unangst wrote:
> > If somebody writes a C program that demonstrates the problem, I'm happy to
> > take a look. I'm not installing erlang.
> 
> It has been ages since I wrote a C program from scratch, but here goes:

Thanks. That wasn't so bad, was it? :)

> And the symptom would be that the ulimit -m limit is not immediately
> enforced.  The question is if that is a problem?  Or rather if I can use
> the ulimit -m limit to prevent a process from taking all memory since I
> need to set a large ulimit -d size to do clever address comparision tricks
> in the Erlang VM.

Ah, indeed. So ulimit -m doesn't do anything any more. I'm not sure when it
stopped, but the man page reflects ancient history. Sorry about that.
Unfortunately, it's not easy to make PROT_NONE stop counting. After all, it
may have been mapped read/write, and modified, then mapped none, but we can't
discard the page.

Reply via email to