diff options
| author | Eli Zaretskii | 2008-11-08 14:19:03 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-11-08 14:19:03 +0000 |
| commit | 7cf94eac0d49c114b6051469dd334af851bcf60c (patch) | |
| tree | 0c63b44ea7c0d18a76489deb3bc50d950ecf80d9 /src | |
| parent | 5463218ceb256c65db72a836bbdcabf536482fb0 (diff) | |
| download | emacs-7cf94eac0d49c114b6051469dd334af851bcf60c.tar.gz emacs-7cf94eac0d49c114b6051469dd334af851bcf60c.zip | |
(get_lim_data): Fix last change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/vm-limit.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9e81d0affd7..34c6df3c66a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2008-11-08 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * vm-limit.c (get_lim_data): Fix last change. | ||
| 4 | |||
| 1 | 2008-11-08 Kenichi Handa <handa@m17n.org> | 5 | 2008-11-08 Kenichi Handa <handa@m17n.org> |
| 2 | 6 | ||
| 3 | * character.c (Fget_byte): New function. | 7 | * character.c (Fget_byte): New function. |
diff --git a/src/vm-limit.c b/src/vm-limit.c index 907732c82af..584d45f13f1 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c | |||
| @@ -129,21 +129,23 @@ get_lim_data () | |||
| 129 | available, which causes bogus "past 95% of memory limit" | 129 | available, which causes bogus "past 95% of memory limit" |
| 130 | warnings. Try to overcome that via circumstantial evidence. */ | 130 | warnings. Try to overcome that via circumstantial evidence. */ |
| 131 | lim1 = info.available_memory; | 131 | lim1 = info.available_memory; |
| 132 | lim2 = info.available_physical_pages * 4096; | 132 | lim2 = info.available_physical_pages; |
| 133 | /* DPMI Spec: "Fields that are unavailable will hold -1." */ | 133 | /* DPMI Spec: "Fields that are unavailable will hold -1." */ |
| 134 | if ((long)lim1 == -1L) | 134 | if ((long)lim1 == -1L) |
| 135 | lim1 = 0; | 135 | lim1 = 0; |
| 136 | if ((long)lim2 == -1L) | 136 | if ((long)lim2 == -1L) |
| 137 | lim2 = 0; | 137 | lim2 = 0; |
| 138 | else | ||
| 139 | lim2 *= 4096; | ||
| 138 | /* Surely, the available memory is at least what we have physically | 140 | /* Surely, the available memory is at least what we have physically |
| 139 | available, right? */ | 141 | available, right? */ |
| 140 | if (lim1 > lim2) | 142 | if (lim1 >= lim2) |
| 141 | lim_data = lim1; | 143 | lim_data = lim1; |
| 142 | else | 144 | else |
| 143 | lim_data = lim2; | 145 | lim_data = lim2; |
| 144 | /* Don't believe they will give us more that 0.5 GB. */ | 146 | /* Don't believe they will give us more that 0.5 GB. */ |
| 145 | if (lim_data > 512 * 1024 * 1024) | 147 | if (lim_data > 512U * 1024U * 1024U) |
| 146 | lim_data = 512 * 1024 * 1024; | 148 | lim_data = 512U * 1024U * 1024U; |
| 147 | } | 149 | } |
| 148 | #else /* not MSDOS */ | 150 | #else /* not MSDOS */ |
| 149 | static void | 151 | static void |