An implementation is needed to provide FOPEN_MAX in <stdio.h> . This is the minimum number of files that can simultaneously open implementation guarantees. You may be able to discover more, but this is the only way to find out what needs to be checked.
Note that the kernel restriction is different from this - it tells you how many files you can (potentially) open with open , creat and other OS calls. The standard library of your C implementation can (and often will) impose its own limit (for example, by statically allocating a FILE array). Theoretically, the largest number you can open is the minimum of the limit imposed by the kernel and the library implementation, but the kernel limit is almost always (much) higher.
Generally speaking, if you're interested, you are probably doing something wrong though.
Jerry Coffin
source share