diff options
| author | Richard M. Stallman | 2006-03-11 15:21:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-03-11 15:21:13 +0000 |
| commit | 02b370adb2780a76ef926b7a8f394fe32a72b7ee (patch) | |
| tree | 16ee5c6723ec816a89a6bfc657b1792f551598b9 /src | |
| parent | e6feb692fb27773fd062a63e2b30aef4db5d4bac (diff) | |
| download | emacs-02b370adb2780a76ef926b7a8f394fe32a72b7ee.tar.gz emacs-02b370adb2780a76ef926b7a8f394fe32a72b7ee.zip | |
(get_lim_data, lim_data, data_space_start): Moved to vm-limit.c.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mem-limits.h | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/src/mem-limits.h b/src/mem-limits.h index 292293b2f98..45dabca3ac5 100644 --- a/src/mem-limits.h +++ b/src/mem-limits.h | |||
| @@ -112,91 +112,5 @@ extern char etext; | |||
| 112 | #endif /* not _LIBC */ | 112 | #endif /* not _LIBC */ |
| 113 | 113 | ||
| 114 | 114 | ||
| 115 | /* start of data space; can be changed by calling malloc_init */ | ||
| 116 | static POINTER data_space_start; | ||
| 117 | |||
| 118 | /* Number of bytes of writable memory we can expect to be able to get */ | ||
| 119 | static unsigned long lim_data; | ||
| 120 | |||
| 121 | #ifdef NO_LIM_DATA | ||
| 122 | static void | ||
| 123 | get_lim_data () | ||
| 124 | { | ||
| 125 | lim_data = -1; | ||
| 126 | } | ||
| 127 | #else /* not NO_LIM_DATA */ | ||
| 128 | |||
| 129 | #ifdef USG | ||
| 130 | |||
| 131 | static void | ||
| 132 | get_lim_data () | ||
| 133 | { | ||
| 134 | extern long ulimit (); | ||
| 135 | |||
| 136 | lim_data = -1; | ||
| 137 | |||
| 138 | /* Use the ulimit call, if we seem to have it. */ | ||
| 139 | #if !defined (ULIMIT_BREAK_VALUE) || defined (GNU_LINUX) | ||
| 140 | lim_data = ulimit (3, 0); | ||
| 141 | #endif | ||
| 142 | |||
| 143 | /* If that didn't work, just use the macro's value. */ | ||
| 144 | #ifdef ULIMIT_BREAK_VALUE | ||
| 145 | if (lim_data == -1) | ||
| 146 | lim_data = ULIMIT_BREAK_VALUE; | ||
| 147 | #endif | ||
| 148 | |||
| 149 | lim_data -= (long) data_space_start; | ||
| 150 | } | ||
| 151 | |||
| 152 | #else /* not USG */ | ||
| 153 | #ifdef WINDOWSNT | ||
| 154 | |||
| 155 | static void | ||
| 156 | get_lim_data () | ||
| 157 | { | ||
| 158 | extern unsigned long reserved_heap_size; | ||
| 159 | lim_data = reserved_heap_size; | ||
| 160 | } | ||
| 161 | |||
| 162 | #else | ||
| 163 | #if !defined (BSD4_2) && !defined (__osf__) | ||
| 164 | |||
| 165 | #ifdef MSDOS | ||
| 166 | void | ||
| 167 | get_lim_data () | ||
| 168 | { | ||
| 169 | _go32_dpmi_meminfo info; | ||
| 170 | |||
| 171 | _go32_dpmi_get_free_memory_information (&info); | ||
| 172 | lim_data = info.available_memory; | ||
| 173 | } | ||
| 174 | #else /* not MSDOS */ | ||
| 175 | static void | ||
| 176 | get_lim_data () | ||
| 177 | { | ||
| 178 | lim_data = vlimit (LIM_DATA, -1); | ||
| 179 | } | ||
| 180 | #endif /* not MSDOS */ | ||
| 181 | |||
| 182 | #else /* BSD4_2 */ | ||
| 183 | |||
| 184 | static void | ||
| 185 | get_lim_data () | ||
| 186 | { | ||
| 187 | struct rlimit XXrlimit; | ||
| 188 | |||
| 189 | getrlimit (RLIMIT_DATA, &XXrlimit); | ||
| 190 | #ifdef RLIM_INFINITY | ||
| 191 | lim_data = XXrlimit.rlim_cur & RLIM_INFINITY; /* soft limit */ | ||
| 192 | #else | ||
| 193 | lim_data = XXrlimit.rlim_cur; /* soft limit */ | ||
| 194 | #endif | ||
| 195 | } | ||
| 196 | #endif /* BSD4_2 */ | ||
| 197 | #endif /* not WINDOWSNT */ | ||
| 198 | #endif /* not USG */ | ||
| 199 | #endif /* not NO_LIM_DATA */ | ||
| 200 | |||
| 201 | /* arch-tag: fe39244e-e54f-4208-b7aa-02556f7841c5 | 115 | /* arch-tag: fe39244e-e54f-4208-b7aa-02556f7841c5 |
| 202 | (do not change this comment) */ | 116 | (do not change this comment) */ |