Lorenz Huedepohl added the comment:
> If that's a problem, then the user can raise the RLIMIT_NOFILE.
This can only be raised (above the hard limit) by a privileged process,
so I would be out of luck there, as I could not convince my sysadmins
to raise this further.
Anyway, I don'
Lorenz Huedepohl added the comment:
Thanks SilentGhost, you were much faster than me :)
I agree with Antoine, that the dup() is unexpected: It cost me some time to
figure out where these additonal file descriptors originated from. One of the
powers of mmap() is, that you do not need one, so
New submission from Lorenz Huedepohl :
The UNIX mmap version in
Modules/mmapmodule.c
makes a call to dup() to duplicate the file descriptor that is passed for
creating the memory-mapped region.
This way, I frequently hit the limit for the number of open file handles while
creating