📄 limits.h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title><limits.h></title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="<limits.h>"></a> <a name="tag_13_24"></a><!-- <limits.h> --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright © 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_13_24_01"></a>NAME</h4><blockquote>limits.h - implementation-defined constants</blockquote><h4><a name="tag_13_24_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><p><tt>#include <limits.h></tt></p></blockquote><h4><a name="tag_13_24_03"></a>DESCRIPTION</h4><blockquote><div class="box"><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]"border="0"> Some of the functionality described on this reference page extends the ISO C standard. Applications shall definethe appropriate feature test macro (see the System Interfaces volume of IEEE Std 1003.1-2001, <a href="../functions/xsh_chap02_02.html">Section 2.2, The Compilation Environment</a>) to enable the visibility of these symbols in thisheader. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></div><p><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Many of the symbols listed here are not defined by the ISO/IEC 9899:1999 standard. Such symbols are not shown as CX shaded.<img src="../images/opt-end.gif" alt="[Option End]" border="0"></p><p>The <i><limits.h></i> header shall define various symbolic names. Different categories of names are described below.</p><p>The names represent various limits on resources that the implementation imposes on applications.</p><p>Implementations may choose any appropriate value for each limit, provided it is not more restrictive than the Minimum AcceptableValues listed below. Symbolic constant names beginning with _POSIX may be found in <a href="unistd.h.html"><i><unistd.h></i></a> .</p><p>Applications should not assume any particular value for a limit. To achieve maximum portability, an application should notrequire more resource than the Minimum Acceptable Value quantity. However, an application wishing to avail itself of the fullamount of a resource available on an implementation may make use of the value given in <i><limits.h></i> on that particularimplementation, by using the symbolic names listed below. It should be noted, however, that many of the listed limits are notinvariant, and at runtime, the value of the limit may differ from those given in this header, for the following reasons:</p><ul><li><p>The limit is pathname-dependent.</p></li><li><p>The limit differs between the compile and runtime machines.</p></li></ul><p>For these reasons, an application may use the <a href="../functions/fpathconf.html"><i>fpathconf</i>()</a>, <a href="../functions/pathconf.html"><i>pathconf</i>()</a>, and <a href="../functions/sysconf.html"><i>sysconf</i>()</a> functions todetermine the actual value of a limit at runtime.</p><p>The items in the list ending in _MIN give the most negative values that the mathematical types are guaranteed to be capable ofrepresenting. Numbers of a more negative value may be supported on some implementations, as indicated by the<i><limits.h></i> header on the implementation, but applications requiring such numbers are not guaranteed to be portable toall implementations. For positive constants ending in _MIN, this indicates the minimum acceptable value.</p><h5><a name="tag_13_24_03_01"></a>Runtime Invariant Values (Possibly Indeterminate)</h5><p>A definition of one of the symbolic names in the following list shall be omitted from <i><limits.h></i> on specificimplementations where the corresponding value is equal to or greater than the stated minimum, but is unspecified.</p><p>This indetermination might depend on the amount of available memory space on a specific instance of a specific implementation.The actual value supported by a specific instance shall be provided by the <a href="../functions/sysconf.html"><i>sysconf</i>()</a>function.</p><dl compact><dt>{AIO_LISTIO_MAX}</dt><dd><sup>[<a href="javascript:open_code('AIO')">AIO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of I/O operations in a single list I/O call supported by the implementation.<br>Minimum Acceptable Value: {_POSIX_AIO_LISTIO_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{AIO_MAX}</dt><dd><sup>[<a href="javascript:open_code('AIO')">AIO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of outstanding asynchronous I/O operations supported by the implementation.<br>Minimum Acceptable Value: {_POSIX_AIO_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{AIO_PRIO_DELTA_MAX}</dt><dd><sup>[<a href="javascript:open_code('AIO')">AIO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The maximum amount by which a process can decrease its asynchronous I/O priority level from its own scheduling priority.<br>Minimum Acceptable Value: 0 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{ARG_MAX}</dt><dd>Maximum length of argument to the <i>exec</i> functions including environment data.<br>Minimum Acceptable Value: {_POSIX_ARG_MAX}</dd><dt>{ATEXIT_MAX}</dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of functions that may be registered with <a href="../functions/atexit.html"><i>atexit</i>()</a>.<br>Minimum Acceptable Value: 32 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{CHILD_MAX}</dt><dd>Maximum number of simultaneous processes per real user ID.<br>Minimum Acceptable Value: {_POSIX_CHILD_MAX}</dd><dt>{DELAYTIMER_MAX}</dt><dd><sup>[<a href="javascript:open_code('TMR')">TMR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of timer expiration overruns.<br>Minimum Acceptable Value: {_POSIX_DELAYTIMER_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{HOST_NAME_MAX}</dt><dd>Maximum length of a host name (not including the terminating null) as returned from the <a href="../functions/gethostname.html"><i>gethostname</i>()</a> function.<br>Minimum Acceptable Value: {_POSIX_HOST_NAME_MAX}</dd><dt>{IOV_MAX}</dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of <b>iovec</b> structures that one process has available for use with <a href="../functions/readv.html"><i>readv</i>()</a> or <a href="../functions/writev.html"><i>writev</i>()</a>.<br>Minimum Acceptable Value: {_XOPEN_IOV_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{LOGIN_NAME_MAX}</dt><dd>Maximum length of a login name.<br>Minimum Acceptable Value: {_POSIX_LOGIN_NAME_MAX}</dd><dt>{MQ_OPEN_MAX}</dt><dd><sup>[<a href="javascript:open_code('MSG')">MSG</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The maximum number of open message queue descriptors a process may hold.<br>Minimum Acceptable Value: {_POSIX_MQ_OPEN_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{MQ_PRIO_MAX}</dt><dd><sup>[<a href="javascript:open_code('MSG')">MSG</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The maximum number of message priorities supported by the implementation.<br>Minimum Acceptable Value: {_POSIX_MQ_PRIO_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{OPEN_MAX}</dt><dd>Maximum number of files that one process can have open at any one time.<br>Minimum Acceptable Value: {_POSIX_OPEN_MAX}</dd><dt>{PAGESIZE}</dt><dd>Size in bytes of a page.<br>Minimum Acceptable Value: 1</dd><dt>{PAGE_SIZE}</dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Equivalent to {PAGESIZE}. If either {PAGESIZE} or {PAGE_SIZE} is defined, the other is defined with the same value. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{PTHREAD_DESTRUCTOR_ITERATIONS}</dt><dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of attempts made to destroy a thread's thread-specific data values on thread exit.<br>Minimum Acceptable Value: {_POSIX_THREAD_DESTRUCTOR_ITERATIONS} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{PTHREAD_KEYS_MAX}</dt><dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of data keys that can be created by a process.<br>Minimum Acceptable Value: {_POSIX_THREAD_KEYS_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{PTHREAD_STACK_MIN}</dt><dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Minimum size in bytes of thread stack storage.<br>Minimum Acceptable Value: 0 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{PTHREAD_THREADS_MAX}</dt><dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of threads that can be created per process.<br>Minimum Acceptable Value: {_POSIX_THREAD_THREADS_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{RE_DUP_MAX}</dt><dd>The number of repeated occurrences of a BRE permitted by the <a href="../functions/regexec.html"><i>regexec</i>()</a> and <a href="../functions/regcomp.html"><i>regcomp</i>()</a> functions when using the interval notation {\(<i>m</i>,<i>n</i>\}; see <a href="xbd_chap09.html#tag_09_03_06"><i>BREs Matching Multiple Characters</i></a> .<br>Minimum Acceptable Value: {_POSIX2_RE_DUP_MAX}</dd><dt>{RTSIG_MAX}</dt><dd><sup>[<a href="javascript:open_code('RTS')">RTS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of realtime signals reserved for application use in this implementation.<br>Minimum Acceptable Value: {_POSIX_RTSIG_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{SEM_NSEMS_MAX}</dt><dd><sup>[<a href="javascript:open_code('SEM')">SEM</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of semaphores that a process may have.<br>Minimum Acceptable Value: {_POSIX_SEM_NSEMS_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{SEM_VALUE_MAX}</dt><dd><sup>[<a href="javascript:open_code('SEM')">SEM</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The maximum value a semaphore may have.<br>Minimum Acceptable Value: {_POSIX_SEM_VALUE_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{SIGQUEUE_MAX}</dt><dd><sup>[<a href="javascript:open_code('RTS')">RTS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of queued signals that a process may send and have pending at the receiver(s) at any time.<br>Minimum Acceptable Value: {_POSIX_SIGQUEUE_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{SS_REPL_MAX}</dt><dd><sup>[<a href="javascript:open_code('SS')">SS|TSP</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The maximum number of replenishment operations that may be simultaneously pending for a particular sporadic server scheduler.<br>Minimum Acceptable Value: {_POSIX_SS_REPL_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{STREAM_MAX}</dt><dd>The number of streams that one process can have open at one time. If defined, it has the same value as {FOPEN_MAX} (see <a href="stdio.h.html"><i><stdio.h></i></a> ).<br>Minimum Acceptable Value: {_POSIX_STREAM_MAX}</dd><dt>{SYMLOOP_MAX}</dt><dd>Maximum number of symbolic links that can be reliably traversed in the resolution of a pathname in the absence of a loop.<br>Minimum Acceptable Value: {_POSIX_SYMLOOP_MAX}</dd><dt>{TIMER_MAX}</dt><dd><sup>[<a href="javascript:open_code('TMR')">TMR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of timers per process supported by the implementation.<br>Minimum Acceptable Value: {_POSIX_TIMER_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{TRACE_EVENT_NAME_MAX}</dt><dd><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum length of the trace event name.<br>Minimum Acceptable Value: {_POSIX_TRACE_EVENT_NAME_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{TRACE_NAME_MAX}</dt><dd><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum length of the trace generation version string or of the trace stream name.<br>Minimum Acceptable Value: {_POSIX_TRACE_NAME_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{TRACE_SYS_MAX}</dt><dd><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of trace streams that may simultaneously exist in the system.<br>Minimum Acceptable Value: {_POSIX_TRACE_SYS_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{TRACE_USER_EVENT_MAX}</dt><dd><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Maximum number of user trace event type identifiers that may simultaneously exist in a traced process, including the predefineduser trace event POSIX_TRACE_UNNAMED_USER_EVENT.<br>Minimum Acceptable Value: {_POSIX_TRACE_USER_EVENT_MAX} <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>{TTY_NAME_MAX}</dt>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -