1. A method for adding file descriptor data in a memory-resident data structure for storing file descriptors for a process, the data structure including a root table and a file descriptor table that is accessed through an entry in the root table, the method comprising: receiving a request from a thread of the process to add a file descriptor to the memory-resident data structure; obtaining a lock on a variable containing a value that represents a maximum number of descriptors for the process; while the lock is held, adding the file descriptor to a new file descriptor table and then updating the variable with an increased value to reflect an increase in the maximum number of file descriptors in the data structure for the process; and releasing the lock.