There is no direct relationship between the value returned by getdtablesize() and OPEN_MAX defined in <limits.h>.
Each process has a file descriptor table which is guaranteed to have at least 20 slots. The entries in the descriptor table are numbered with small integers starting at 0. The getdtablesize() function returns the current maximum size of this table by calling the getrlimit() function.