diff options
Diffstat (limited to 'src/mem-limits.h')
| -rw-r--r-- | src/mem-limits.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mem-limits.h b/src/mem-limits.h index 06c8e1f5dd0..e2df73ee8d0 100644 --- a/src/mem-limits.h +++ b/src/mem-limits.h | |||
| @@ -77,13 +77,20 @@ static void | |||
| 77 | get_lim_data () | 77 | get_lim_data () |
| 78 | { | 78 | { |
| 79 | extern long ulimit (); | 79 | extern long ulimit (); |
| 80 | 80 | ||
| 81 | #ifdef ULIMIT_BREAK_VALUE | 81 | lim_data = -1; |
| 82 | lim_data = ULIMIT_BREAK_VALUE; | 82 | |
| 83 | #else | 83 | /* Use the ulimit call, if we seem to have it. */ |
| 84 | #if !defined (ULIMIT_BREAK_VALUE) || defined (LINUX) | ||
| 84 | lim_data = ulimit (3, 0); | 85 | lim_data = ulimit (3, 0); |
| 85 | #endif | 86 | #endif |
| 86 | 87 | ||
| 88 | /* If that didn't work, just use the macro's value. */ | ||
| 89 | #ifdef ULIMIT_BREAK_VALUE | ||
| 90 | if (lim_data == -1) | ||
| 91 | lim_data = ULIMIT_BREAK_VALUE; | ||
| 92 | #endif | ||
| 93 | |||
| 87 | lim_data -= (long) data_space_start; | 94 | lim_data -= (long) data_space_start; |
| 88 | } | 95 | } |
| 89 | 96 | ||