-
David Johnson authored
This tries to read /proc/getpid()/maps and mlock all pages in those mapped regions. Well, it tries to do better than page by page; we try chunks of 32KB until they fail (32KB is a traditional kernel default for RLIMIT_MEMLOCK). Unfortunately, this seems to work for the first many pages, but then it starts failing in mapped libraries. Hah! Who knows why. I tried sleeping in case it was some kind of race in munlock*(); no joy. Maybe RLIMITS are ratelimited too :)
033a6490