On Wed, 20 Oct 2010 20:06:41 +0000 (UTC) mlel...@serpens.de (Michael van Elst) wrote:
> The soft rlimit and the UVM limit happen to be the same size, > which is one third of the real memory. > > uvm_pdaemon.c: > uvmexp.wiredmax = uvmexp.npages / 3; > > kern_proc.c: > lim = MIN(VM_MAXUSER_ADDRESS, ctob((rlim_t)uvmexp.free)); > ... > limit0.pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = lim / 3; OK, if I understand you correctly, there is hardcoded limit on how much memory can be locked, it is set to 1/3 of total memory and cannot be changed. If that's the case, then why supplement soft and hard rlimit with UVM limit?