Headers limits.h(3HEAD)
NAME
limits.h, limits - implementation-defined constants
SYNOPSIS
#include
DESCRIPTION
The
ferent categories of names are described below.header defines various symbolic names. Dif- The names represent various limits on resources that the
implementation imposes on applications. Symbolic constantnames beginning with _POSIX can be found in unistd.h(3HEAD).
Applications should not assume any particular value for a limit. An application wishing to avail itself of the full amount of a resource available on an implementation can makeuse of the value given in limits.h on that particular imple-
mentation by using the symbolic names listed below. Many ofthe listed limits are not invariant, and at runtime, the
value of the limit might differ from those given in this header, for the following reasons:o The limit is pathname-dependent.
o The limit differs between the compile and runtime machines. For these reasons, an application can use the fpathconf(2), pathconf(2), and sysconf(3C) functions to determine the actual value of a limit at runtime. Runtime Invariant Values (Possibly Indeterminate)AIO_LISTIO_MAX
Maximum number of I/O operations in a single list I/O call supported by the implementation.
AIO_MAX
Maximum number of outstanding asynchronous I/O opera-
tions supported by the implementation.AIO_PRIO_DELTA_MAX
The maximum amount by which a process can decrease itsSunOS 5.11 Last change: 8 April 2004 1
Headers limits.h(3HEAD)
asynchronous I/O priority level from its own scheduling priority.
ARG_MAX
Maximum length of argument to the exec(2) functions including environment data.ATEXIT_MAX
Maximum number of functions that can be registered with atexit(3C).CHILD_MAX
Maximum number of simultaneous processes per real user ID.CLK_TCK
Number of clock ticks per second returned by the times(2) function.DELAYTIMER_MAX
Maximum number of timer expiration overruns.HOST_NAME_MAX
Maximum length of a host name (not including the ter-
minating null) as returned from the gethostname(3C) function.IOV_MAX
Maximum number of iovec structures that one process has available for use with read(2) or write(2).LOGIN_NAME_MAX
Maximum length of a login name.SunOS 5.11 Last change: 8 April 2004 2
Headers limits.h(3HEAD)
MQ_OPEN_MAX
The maximum number of open message queue descriptors a process is allowed to hold.LOGIN_NAME_MAX
Maximum length of a login name.MQ_OPEN_MAX
The maximum number of open message queue descriptors a process is allowed to hold.MQ_PRIO_MAX
The maximum number of message priorities supported by the implementation.OPEN_MAX
Maximum number of files that one process can have open at any one time. PAGESIZE Size in bytes of a page.PAGE_SIZE
Equivalent to PAGESIZE. If either PAGESIZE or PAGE_SIZE
is defined, the other is defined with the same value.PASS_MAX
The maximum number of significant bytes in a password, not including the terminating null.PTHREAD_DESTRUCTOR_ITERATIONS
Maximum number of attempts made to destroy a thread'sthread-specific data values on thread exit.
SunOS 5.11 Last change: 8 April 2004 3
Headers limits.h(3HEAD)
PTHREAD_KEYS_MAX
Maximum number of data keys that can be created by a process.PTHREAD_STACK_MIN
Minimum size in bytes of thread stack storage.PTHREAD_THREADS_MAX
Maximum number of threads that can be created per pro-
cess.RE_DUP_MAX
The number of repeated occurrences of a BRE permitted by the regexec(3C) and regcomp(3C) functions when using the interval notation {\(m,n\}.RTSIG_MAX
Maximum number of realtime signals reserved for applica-
tion use in this implementation.SEM_NSEMS_MAX
Maximum number of semaphores that a process can have.SEM_VALUE_MAX
The maximum value a semaphore can have.SIGQUEUE_MAX
Maximum number of queued signals that a process can send and have pending at the receiver(s) at any time.SS_REPL_MAX
The maximum number of replenishment operations that may be simultaneously pending for a particular sporadic server scheduler.SunOS 5.11 Last change: 8 April 2004 4
Headers limits.h(3HEAD)
STREAM_MAX
The number of streams that one process can have open at one time. If defined, it has the same value asFOPEN_MAX.
SYMLOOP_MAX
Maximum number of symbolic links that can be reliably traversed in the resolution of a pathname in the absence of a loop.TIMER_MAX
Maximum number of timers per process supported by the implementation.TRACE_EVENT_NAME_MAX
Maximum length of the trace event name.TRACE_NAME_MAX
Maximum length of the trace generation version string or of the trace stream name.TRACE_SYS_MAX
Maximum number of trace streams that may simultaneously exist in the system.TRACE_USER_EVENT_MAX
Maximum number of user trace event type identifiers that may simultaneously exist in a traced process, including the predefined user trace eventPOSIX_TRACE_UNNAMED_USER_EVENT.
TTY_NAME_MAX
Maximum length of terminal device name.TZNAME_MAX
SunOS 5.11 Last change: 8 April 2004 5
Headers limits.h(3HEAD)
Maximum number of bytes supported for the name of a timezone (not of the TZ variable). Pathname Variable Values The values in the following list can be constants within an implementation or can vary from one pathname to another. For example, file systems or directories can have different characteristics. The value supported for a specific pathname is provided by the pathconf(2) function. FILESIZEBITS Minimum number of bits needed to represent, as a signed integer value, the maximum size of a regular file allowed in the specified directory.LINK_MAX Maximum number of links to a
single file.MAX_CANON Maximum number of bytes in a
terminal canonical input line.MAX_INPUT Minimum number of bytes for
which space is available in a terminal input queue; therefore, the maximum number of bytes a conforming application may require to be typed as input before reading them.NAME_MAX Maximum number of bytes in a
filename (not including ter-
minating null).PATH_MAX Maximum number of bytes in a
pathname, including the ter-
minating null character.PIPE_BUF Maximum number of bytes that is
guaranteed to be atomic when writing to a pipe.POSIX_ALLOC_SIZE_MIN Minimum number of bytes of
storage actually allocated forSunOS 5.11 Last change: 8 April 2004 6
Headers limits.h(3HEAD)
any portion of a file.POSIX_REC_INCR_XFER_SIZE Recommended increment for file
transfer sizes between thePOSIX_REC_MIN_XFER_SIZE and
POSIX_REC_MAX_XFER_SIZE values.
POSIX_REC_MAX_XFER_SIZE Maximum recommended file
transfer size.POSIX_REC_MIN_XFER_SIZE Minimum recommended file
transfer size.POSIX_REC_XFER_ALIGN Recommended file transfer buffer
alignment.SYMLINK_MAX Maximum number of bytes in a
symbolic link. Runtime Increasable Values The magnitude limitations in the following list are fixed by specific implementations. An application should assume thatthe value supplied by
tion is the minimum that pertains whenever the application is run under that implementation. A specific instance of a specific implementation can increase the value relative toin a specific implementa- that supplied by
actual value supported by a specific instance is provided by the sysconf(3C) function.for that implementation. The BC_BASE_MAX Maximum obase values allowed by the
bc(1) utility.BC_DIM_MAX Maximum number of elements permitted
in an array by the bc utility.BC_SCALE_MAX Maximum scale value allowed by the bc
utility.BC_STRING_MAX Maximum length of a string constant
accepted by the bc utility.SunOS 5.11 Last change: 8 April 2004 7
Headers limits.h(3HEAD)
CHARCLASS_NAME_MAX Maximum number of bytes in a character
class name.COLL_WEIGHTS_MAX Maximum number of weights that can be
assigned to an entry of the LC_COLLATE
order keyword in the locale definition file.EXPR_NEST_MAX Maximum number of expressions that can
be nested within parentheses by the expr(1) utility.EXPR_NEST_MAX Maximum number of expressions that can
be nested within parentheses by the expr utility.LINE_MAX Unless otherwise noted, the maximum
length, in bytes, of a utility's input line (either standard input or another file), when the utility is described as processing text files. The lengthincludes room for the trailing
line>. NGROUPS_MAX Maximum number of simultaneous supple-
mentary group IDs per process.RE_DUP_MAX Maximum number of repeated occurrences
of a regular expression permitted when using the interval notation \{m,n\}. Maximum Values The symbolic constants in the following list are symbolic names for the most restrictive value for certain features on an implementation supporting the POSIX Timers option._POSIX_CLOCKRES_MIN The resolution of the CLOCK_REALTIME
clock, in nanoseconds. Minimum Values The symbolic constants in the following list are symbolic names for the most restrictive value for certain features on an implementation conforming to various POSIX and Single Unix Specification requirements. See standards(5).SunOS 5.11 Last change: 8 April 2004 8
Headers limits.h(3HEAD)
_POSIX_AIO_LISTIO_MAX
The number of I/O operations that can be specified in a
list I/O call.
_POSIX_AIO_MAX
The number of outstanding asynchronous I/O operations.
_POSIX_ARG_MAX
Maximum length of argument to the exec(2) functions including environment data._POSIX_CHILD_MAX
Maximum number of simultaneous processes per real user ID._POSIX_DELAYTIMER_MAX
The number of timer expiration overruns._POSIX_HOST_NAME_MAX
Maximum length of a host name (not including the ter-
minating null) as returned from the gethostname(3C) function._POSIX_LINK_MAX
Maximum number of links to a single file._POSIX_LOGIN_NAME_MAX
The size of the storage required for a login name, in bytes, including the terminating null._POSIX_MAX_CANON
Maximum number of bytes in a terminal canonical input queue.SunOS 5.11 Last change: 8 April 2004 9
Headers limits.h(3HEAD)
_POSIX_MAX_INPUT
Maximum number of bytes allowed in a terminal input queue._POSIX_MQ_OPEN_MAX
The number of message queues that can be open for a sin-
gle process._POSIX_MQ_PRIO_MAX
The maximum number of message priorities supported by the implementation._POSIX_NAME_MAX
Maximum number of bytes in a filename (not including terminating null)._POSIX_NGROUPS_MAX
Maximum number of simultaneous supplementary group IDs per process._POSIX_OPEN_MAX
Maximum number of files that one process can have open at any one time._POSIX_PATH_MAX
Maximum number of bytes in a pathname._POSIX_PIPE_BUF
Maximum number of bytes that is guaranteed to be atomic when writing to a pipe._POSIX_RE_DUP_MAX
The number of repeated occurrences of a BRE permitted by the regexec() and regcomp() functions when using the interval notation {\(m,n\}SunOS 5.11 Last change: 8 April 2004 10
Headers limits.h(3HEAD)
_POSIX_RTSIG_MAX
The number of realtime signal numbers reserved for application use._POSIX_SEM_NSEMS_MAX
The number of semaphores that a process can have._POSIX_SEM_VALUE_MAX
The maximum value a semaphore can have._POSIX_SIGQUEUE_MAX
The number of queued signals that a process can send and have pending at the receiver(s) at any time._POSIX_SSIZE_MAX
The value that can be stored in an object of typessize_t.
_POSIX_STREAM_MAX
The number of streams that one process can have open at one time._POSIX_SS_REPL_MAX
The number of replenishment operations that can be simultaneously pending for a particular sporadic server scheduler._POSIX_SYMLINK_MAX
The number of bytes in a symbolic link._POSIX_SYMLOOP_MAX
The number of symbolic links that can be traversed in the resolution of a pathname in the absence of a loop.SunOS 5.11 Last change: 8 April 2004 11
Headers limits.h(3HEAD)
_POSIX_THREAD_DESTRUCTOR_ITERATIONS
The number of attempts made to destroy a thread'sthread-specific data values on thread exit.
_POSIX_THREAD_KEYS_MAX
The number of data keys per process._POSIX_THREAD_THREADS_MAX
The number of threads per process._POSIX_TIMER_MAX
The per-process number of timers.
_POSIX_TRACE_EVENT_NAME_MAX
The length in bytes of a trace event name._POSIX_TRACE_NAME_MAX
The length in bytes of a trace generation version string or a trace stream name._POSIX_TRACE_SYS_MAX
The number of trace streams that can simultaneously exist in the system._POSIX_TRACE_USER_EVENT_MAX
The number of user trace event type identifiers that may simultaneously exist in a traced process, including the predefined user trace eventPOSIX_TRACE_UNNAMED_USER_EVENT.
_POSIX_TTY_NAME_MAX
The size of the storage required for a terminal device name, in bytes, including the terminating null.SunOS 5.11 Last change: 8 April 2004 12
Headers limits.h(3HEAD)
_POSIX_TZNAME_MAX
Maximum number of bytes supported for the name of a timezone (not of the TZ variable)._POSIX2_BC_BASE_MAX
Maximum obase values allowed by the bc utility._POSIX2_BC_DIM_MAX
Maximum number of elements permitted in an array by the bc utility._POSIX2_BC_SCALE_MAX
Maximum scale value allowed by the bc utility._POSIX2_BC_STRING_MAX
Maximum length of a string constant accepted by the bc utility._POSIX2_CHARCLASS_NAME_MAX
Maximum number of bytes in a character class name._POSIX2_COLL_WEIGHTS_MAX
Maximum number of weights that can be assigned to anentry of the LC_COLLATE order keyword in the locale
definition file._POSIX2_EXPR_NEST_MAX
Maximum number of expressions that can be nested within parentheses by the expr utility._POSIX2_LINE_MAX
Unless otherwise noted, the maximum length, in bytes, of a utility's input line (either standard input or another file), when the utility is described as processing text files. The length includes room for the trailingSunOS 5.11 Last change: 8 April 2004 13
Headers limits.h(3HEAD)
. _POSIX2_RE_DUP_MAX
Maximum number of repeated occurrences of a regular expression permitted when using the interval notation \{m,n\}._XOPEN_IOV_MAX
Maximum number of iovec structures that one process has available for use with read(2) or write(2)._XOPEN_NAME_MAX
Maximum number of bytes in a filename (not including the terminating null)._XOPEN_PATH_MAX
Maximum number of bytes in a pathname. Numerical Limits The values in the following lists shall be defined in
and are constant expressions suitable for use in #if preprocessing directives. Moreover, except for CHAR_BIT,
DBL_DIG, DBL_MAX, FLT_DIG, FLT_MAX, LONG_BIT, WORD_BIT, and
MB_LEN_MAX, the symbolic names are defined as expressions of
the correct type. If the value of an object of type char is treated as a signed integer when used in an expression, the value ofCHAR_MIN is the same as that of SCHAR_MIN and the value of
CHAR_MAX is the same as that of SCHAR_MAX. Otherwise, the
value of CHAR_MIN is 0 and the value of CHAR_MAX is the same
as that of UCHAR_MAX.
CHAR_BIT Number of bits in a type char.
CHAR_MAX Maximum value of type char.
CHAR_MIN Minimum value of type char.
SunOS 5.11 Last change: 8 April 2004 14
Headers limits.h(3HEAD)
DBL_DIG Digits of precision of type double.
DBL_MAX Maximum decimal value of a double.
DBL_MIN Minimum decimal value of a double.
FLT_DIG Digits of precision of type float.
FLT_MAX Maximum decimal value of a float.
FLT_MIN Minimum decimal value of a float.
INT_MIN Minimum value of type int.
INT_MAX Maximum value of an int.
LLONG_MIN Minimum value of type long long.
LLONG_MAX Maximum value of type long long.
LONG_BIT Number of bits in a long.
LONG_MIN Minimum value of type long.
LONG_MAX Maximum value of a long.
MB_LEN_MAX Maximum number of bytes in a character, for
any supported locale.SCHAR_MIN Minimum value of type signed char.
SCHAR_MAX Maximum value of type signed char.
SHRT_MIN Minimum value of type short.
SunOS 5.11 Last change: 8 April 2004 15
Headers limits.h(3HEAD)
SHRT_MAX Maximum value of type short.
SSIZE_MAX Maximum value of an object of type ssize_t.
TMP_MAX Minimum number of unique filename generated by
tmpnam(3C). Maximum number of times an appli-
cation can call tmpnam() reliably.UCHAR_MAX Maximum value of type unsigned char.
UINT_MAX Maximum value of type unsigned.
ULLONG_MAX Maximum value of type unsigned long long.
ULONG_MAX Maximum value of type unsigned long.
USHRT_MAX Maximum value for a type unsigned short.
WORD_BIT Number of bits in a word or type int.
Other Invariant ValuesThe following constants are defined in
. CHARCLASS_NAME_MAX Maximum number of bytes in a character
class name.LOGNAME_MAX The maximum number of bytes supported
in a user's login name.NL_ARGMAX Maximum value of digit in calls to the
printf(3C) and scanf(3C) functions.NL_LANGMAX Maximum number of bytes in a LANG
name.NL_MSGMAX Maximum message number.
SunOS 5.11 Last change: 8 April 2004 16
Headers limits.h(3HEAD)
NL_NMAX Maximum number of bytes in an N-to-1
collation mapping.NL_SETMAX Maximum set number.
NL_TEXTMAX Maximum number of bytes in a message
string. NZERO Default process priority.SEE ALSO
fpathconf(2), pathconf(2), sysconf(3C), standards(5)SunOS 5.11 Last change: 8 April 2004 17