MCPcopy Create free account
hub / github.com/axboe/liburing / adjust_nfiles

Function adjust_nfiles

test/file-register.c:510–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510static void adjust_nfiles(int want_files)
511{
512 struct rlimit rlim;
513
514 if (getrlimit(RLIMIT_NOFILE, &rlim) < 0)
515 return;
516 if (rlim.rlim_cur >= want_files)
517 return;
518 rlim.rlim_cur = want_files;
519 setrlimit(RLIMIT_NOFILE, &rlim);
520}
521
522/*
523 * Register 8K of sparse files, update one at a random spot, then do some

Callers 1

test_hugeFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_hugeFunction · 0.68