Mercurial > hg > xemacs-beta
comparison src/mem-limits.h @ 410:de805c49cfc1 r21-2-35
Import from CVS: tag r21-2-35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:19:21 +0200 |
parents | 2f8bb876ab1d |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
409:301b9ebbdf3b | 410:de805c49cfc1 |
---|---|
36 | 36 |
37 #ifdef HAVE_ULIMIT_H | 37 #ifdef HAVE_ULIMIT_H |
38 #include <ulimit.h> | 38 #include <ulimit.h> |
39 #endif | 39 #endif |
40 | 40 |
41 #ifdef MSDOS | |
42 #include <dpmi.h> | |
43 #endif | |
44 | |
45 /* Some systems need this before <sys/resource.h>. */ | 41 /* Some systems need this before <sys/resource.h>. */ |
46 #include <sys/types.h> | 42 #include <sys/types.h> |
47 | 43 |
48 #ifdef _LIBC | 44 #ifdef _LIBC |
49 | 45 |
68 #endif /*Added by Fukui*/ | 64 #endif /*Added by Fukui*/ |
69 #endif | 65 #endif |
70 | 66 |
71 #ifndef BSD4_2 | 67 #ifndef BSD4_2 |
72 #ifndef USG | 68 #ifndef USG |
73 #ifndef MSDOS | 69 #ifndef WIN32_NATIVE |
74 #ifndef WINDOWSNT | 70 #ifndef CYGWIN |
75 #ifndef __CYGWIN32__ | |
76 #if defined(__linux__) && defined(powerpc) /*Added Kaoru Fukui*/ | 71 #if defined(__linux__) && defined(powerpc) /*Added Kaoru Fukui*/ |
77 #else /*Added Kaoru Fukui*/ | 72 #else /*Added Kaoru Fukui*/ |
78 #include <sys/vlimit.h> | 73 #include <sys/vlimit.h> |
79 #endif /*Added by Fukui*/ | 74 #endif /*Added by Fukui*/ |
80 #endif /* not __CYGWIN32__ */ | 75 #endif /* not CYGWIN */ |
81 #endif /* not WINDOWSNT */ | 76 #endif /* not WIN32_NATIVE */ |
82 #endif /* not MSDOS */ | |
83 #endif /* not USG */ | 77 #endif /* not USG */ |
84 #else /* if BSD4_2 */ | 78 #else /* if BSD4_2 */ |
85 #include <sys/time.h> | 79 #include <sys/time.h> |
86 #include <sys/resource.h> | 80 #include <sys/resource.h> |
87 #endif /* BSD4_2 */ | 81 #endif /* BSD4_2 */ |
94 typedef void *POINTER; | 88 typedef void *POINTER; |
95 #else | 89 #else |
96 typedef char *POINTER; | 90 typedef char *POINTER; |
97 #endif | 91 #endif |
98 | 92 |
99 #ifndef __CYGWIN32__ | 93 #ifndef CYGWIN |
100 typedef unsigned long SIZE; | 94 typedef unsigned long SIZE; |
101 #endif | 95 #endif |
102 | 96 |
103 extern POINTER start_of_data (void); | 97 extern POINTER start_of_data (void); |
104 #define EXCEEDS_LISP_PTR(ptr) 0 | 98 #define EXCEEDS_LISP_PTR(ptr) 0 |
167 | 161 |
168 lim_data -= (long) data_space_start; | 162 lim_data -= (long) data_space_start; |
169 } | 163 } |
170 | 164 |
171 #else /* not USG */ | 165 #else /* not USG */ |
172 #if defined( WINDOWSNT ) | 166 #if defined( WIN32_NATIVE ) |
173 | 167 |
174 static void | 168 static void |
175 get_lim_data (void) | 169 get_lim_data (void) |
176 { | 170 { |
177 extern unsigned long data_region_size; | 171 extern unsigned long data_region_size; |
179 } | 173 } |
180 | 174 |
181 #else | 175 #else |
182 #if !defined (BSD4_2) && !defined (__osf__) | 176 #if !defined (BSD4_2) && !defined (__osf__) |
183 | 177 |
184 #ifdef MSDOS | |
185 void | |
186 get_lim_data (void) | |
187 { | |
188 _go32_dpmi_meminfo info; | |
189 | |
190 _go32_dpmi_get_free_memory_information (&info); | |
191 lim_data = info.available_memory; | |
192 } | |
193 #else /* not MSDOS */ | |
194 static void | 178 static void |
195 get_lim_data (void) | 179 get_lim_data (void) |
196 { | 180 { |
197 lim_data = vlimit (LIM_DATA, -1); | 181 lim_data = vlimit (LIM_DATA, -1); |
198 } | 182 } |
199 #endif /* not MSDOS */ | |
200 | 183 |
201 #else /* BSD4_2 */ | 184 #else /* BSD4_2 */ |
202 | 185 |
203 static void | 186 static void |
204 get_lim_data (void) | 187 get_lim_data (void) |
211 #else | 194 #else |
212 lim_data = XXrlimit.rlim_cur; /* soft limit */ | 195 lim_data = XXrlimit.rlim_cur; /* soft limit */ |
213 #endif | 196 #endif |
214 } | 197 } |
215 #endif /* BSD4_2 */ | 198 #endif /* BSD4_2 */ |
216 #endif /* not WINDOWSNT */ | 199 #endif /* not WIN32_NATIVE */ |
217 #endif /* not USG */ | 200 #endif /* not USG */ |
218 #endif /* not NO_LIM_DATA */ | 201 #endif /* not NO_LIM_DATA */ |
219 #endif /* not HEAP_IN_DATA */ | 202 #endif /* not HEAP_IN_DATA */ |
220 | 203 |
221 #endif /* INCLUDED_mem_limits_h_ */ | 204 #endif /* INCLUDED_mem_limits_h_ */ |