File: fdsetsize.txt

package info (click to toggle)
ldapjdk 5.3.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,756 kB
  • sloc: ansic: 44,727; java: 39,706; xml: 7,623; sh: 4,497; perl: 3,774; makefile: 1,680; cpp: 979
file content (106 lines) | stat: -rw-r--r-- 5,376 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
# 
# The contents of this file are subject to the Mozilla Public License Version 
# 1.1 (the "License"); you may not use this file except in compliance with 
# the License. You may obtain a copy of the License at 
# http://www.mozilla.org/MPL/
# 
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
# 
# The Original Code is Mozilla Communicator client code.
# 
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
# 
# Contributor(s):
# 
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
# 
# ***** END LICENSE BLOCK ***** 

Hpux:
=====
The use of a timeout does not affect any pending timers set up by alarm(), ualarm(), or setitimer().
On successful completion, the object pointed to by the timeout argument may be modified.
The FD_SETSIZE is used in the definition of fd_set structure. It is set to a value of 2048 to
accommodate 2048 file descriptors. Any user code that uses FD_SETSIZE or the structure fd_set
should redefine FD_SETSIZE to a smaller value (greater than or equal to the number of open files the
process will have) in order to save space. Similarly, any user code that wants to test more than 2048
file descriptors should redefine FD_SETSIZE to the required higher value.

Solaris:
========
     The default value for FD_SETSIZE (currently 1024) is  larger
     than  the  default  limit  on  the  number of open files. To
     accommodate 32-bit applications that  wish to use  a  larger
     number  of  open  files  with  select(),  it  is possible to
     increase this size at compile time  by  providing  a  larger
     definition   of   FD_SETSIZE   before   the   inclusion   of
     <sys/types.h>. The maximum supported size for FD_SETSIZE  is
     65536.  The default value is already 65536 for 64-bit appli-
     cations.


Windows:
========
  Four macros are defined in the header file Winsock.h for manipulating and checking the
  descriptor sets. The variable FD_SETSIZE determines the maximum number of descriptors in a
  set. (The default value of FD_SETSIZE is 64, which can be modified by defining FD_SETSIZE to
  another value before including Winsock.h.) Internally, socket handles in an FD_SET structure are
  not represented as bit flags as in Berkeley Unix. Their data representation is opaque. Use of
  these macros will maintain software portability between different socket environments. The
  macros to manipulate and check FD_SET contents are:
  

Aix:
====
Although the provision of getdtablesize(2SEQ) was intended to allow user programs to be written independently of the kernel limit on the number of open
files, the dimension of a sufficiently large bit field for select remains a problem. The default size FD_SETSIZE (currently 8192) is somewhat larger than the
current kernel limit to the number of open files. However, in order to accommodate programs which might potentially use a larger number of open files with
select, it is possible to increase this size within a program by providing a larger definition of FD_SETSIZE before the inclusion of <sys/select.h>. 
select() should probably return the time remaining from the original timeout, if any, by modifying the time value in place. This may be implemented in future
versions of the system. Thus, it is unwise to assume that the timeout value will be unmodified by the select() call.


Tru 64:
=======
    3.This step is required only for applications that use select(), fd_set, FD_CLR, FD_ISSET, FD_SET, or FD_ZERO. Choose one of the following: 

              Override the default value (4k) for FD_SETSIZE in <sys/select.h> by specifying the new maximum (65536). You must do this before
              including the <sys/time.h> header file, which includes <sys/select.h>: 

              #define FD_SETSIZE 65536
              #include <sys/time.h>

              This setting is not inherited by child processes; therefore, FD_SETSIZE must be set explicitly in the code of a child process that requires 64k file
              descriptor support. 


Linux:
======

No documented way of overriding the variable.

/* One element in the file descriptor mask array.  */
typedef unsigned long int __fd_mask;

/* Number of descriptors that can fit in an `fd_set'.  */
#define __FD_SETSIZE    1024