comparison src/mem-limits.h @ 74:54cc21c15cbb r20-0b32

Import from CVS: tag r20-0b32
author cvs
date Mon, 13 Aug 2007 09:04:33 +0200
parents 131b0175ea99
children 15872534500d
comparison
equal deleted inserted replaced
73:e2d7a37b7c8d 74:54cc21c15cbb
110 /* Number of bytes of writable memory we can expect to be able to get */ 110 /* Number of bytes of writable memory we can expect to be able to get */
111 extern unsigned int lim_data; 111 extern unsigned int lim_data;
112 112
113 #ifdef NO_LIM_DATA 113 #ifdef NO_LIM_DATA
114 static void 114 static void
115 get_lim_data () 115 get_lim_data (void)
116 { 116 {
117 lim_data = -1; 117 lim_data = -1;
118 } 118 }
119 #else /* not NO_LIM_DATA */ 119 #else /* not NO_LIM_DATA */
120 120
121 #ifdef USG 121 #ifdef USG
122 122
123 static void 123 static void
124 get_lim_data () 124 get_lim_data (void)
125 { 125 {
126 extern long ulimit (); 126 extern long ulimit ();
127 127
128 lim_data = -1; 128 lim_data = -1;
129 129
143 143
144 #else /* not USG */ 144 #else /* not USG */
145 #ifdef WINDOWSNT 145 #ifdef WINDOWSNT
146 146
147 static void 147 static void
148 get_lim_data () 148 get_lim_data (void)
149 { 149 {
150 extern unsigned long data_region_size; 150 extern unsigned long data_region_size;
151 lim_data = data_region_size; 151 lim_data = data_region_size;
152 } 152 }
153 153
154 #else 154 #else
155 #if !defined (BSD4_2) && !defined (__osf__) 155 #if !defined (BSD4_2) && !defined (__osf__)
156 156
157 #ifdef MSDOS 157 #ifdef MSDOS
158 void 158 void
159 get_lim_data () 159 get_lim_data (void)
160 { 160 {
161 _go32_dpmi_meminfo info; 161 _go32_dpmi_meminfo info;
162 162
163 _go32_dpmi_get_free_memory_information (&info); 163 _go32_dpmi_get_free_memory_information (&info);
164 lim_data = info.available_memory; 164 lim_data = info.available_memory;
165 } 165 }
166 #else /* not MSDOS */ 166 #else /* not MSDOS */
167 static void 167 static void
168 get_lim_data () 168 get_lim_data (void)
169 { 169 {
170 lim_data = vlimit (LIM_DATA, -1); 170 lim_data = vlimit (LIM_DATA, -1);
171 } 171 }
172 #endif /* not MSDOS */ 172 #endif /* not MSDOS */
173 173
174 #else /* BSD4_2 */ 174 #else /* BSD4_2 */
175 175
176 static void 176 static void
177 get_lim_data () 177 get_lim_data (void)
178 { 178 {
179 struct rlimit XXrlimit; 179 struct rlimit XXrlimit;
180 180
181 getrlimit (RLIMIT_DATA, &XXrlimit); 181 getrlimit (RLIMIT_DATA, &XXrlimit);
182 #ifdef RLIM_INFINITY 182 #ifdef RLIM_INFINITY