Well this is not really a limit on number of files, rather a memory allocation optimization for fd_array. The limit you are looking for is:<br><br>int sysctl_nr_open __read_mostly = 1024*1024;<br><br>$ cat /proc/sys/fs/nr_open <br>
1048576<br><br>-Rajat<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 5, 2012 at 4:38 PM, Vijay Chauhan <span dir="ltr"><<a href="mailto:kernel.vijay@gmail.com" target="_blank">kernel.vijay@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
How many files a process can open at a time? Is it configurable?<br>
<br>
I found following in the kernel code:<br>
<br>
..<br>
.max_fds = NR_OPEN_DEFAULT,<br>
..<br>
..<br>
#define NR_OPEN_DEFAULT BITS_PER_LONG<br>
..<br>
..<br>
#ifdef __KERNEL__<br>
#define BITS_PER_LONG 32<br>
..<br>
<br>
But I can open more than 32 files in my user space program.<br>
<br>
Thank you,<br>
Vijay<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br></div>