RFR: 8291060: OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE

Gerard Ziemski gziemski at openjdk.org
Tue Jul 26 22:15:34 UTC 2022


On macOS we are currently using setrlimit(RLIMIT_NOFILE, OPEN_MAX) for MaxFDLimit (it's ON by default), but we can go higher than that. 

My own testing on macOS 12.3.1 reveals that we can ask for setrlimit(RLIMIT_NOFILE, RLIM_INFINITY), though in reality we will get back 32765, which is still more than OPEN_MAX (10240)

-------------

Commit messages:
 - use RLIM_INFINITY for RLIMIT_NOFILE if possible

Changes: https://git.openjdk.org/jdk/pull/9650/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9650&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8291060
  Stats: 19 lines in 1 file changed: 11 ins; 8 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/9650.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9650/head:pull/9650

PR: https://git.openjdk.org/jdk/pull/9650


More information about the hotspot-runtime-dev mailing list