---
name: "getdtablesize"
section: "2freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/getdtablesize/2freebsd"
---

# getdtablesize(2freebsd)

get file descriptor limit

## NAME

**getdtablesize** – get file descriptor limit

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<unistd.h\>**

*int*\

**getdtablesize**(*void*);

## DESCRIPTION

The **getdtablesize**() system call returns the maximum number of file descriptors that the current process may open. The maximum file descriptor number that the system may assign is the return value minus one. Existing file descriptor numbers may be higher if the limit was lowered after they were opened.

## SEE ALSO

[close(2)](/close/2.md), [closefrom(2)](/closefrom/2.md), [dup(2)](/dup/2.md), [getrlimit(2)](/getrlimit/2.md), [sysconf(3)](/sysconf/3.md)

## HISTORY

The **getdtablesize**() system call appeared in 4.2BSD.
