diff options
| author | Eli Zaretskii | 2012-06-23 14:07:01 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-06-23 14:07:01 +0300 |
| commit | c81b46f68faf94738e7c96bece4a2627451aceb4 (patch) | |
| tree | 56c592f01417fb9816b3d3a71ccdc8c7967b7a7e /src/ralloc.c | |
| parent | ec55c5e0b0d548a1c1029094682c4645c8740934 (diff) | |
| download | emacs-c81b46f68faf94738e7c96bece4a2627451aceb4.tar.gz emacs-c81b46f68faf94738e7c96bece4a2627451aceb4.zip | |
Backport: Really fix bug #11519, by fixing the last change in ralloc.c.
src/ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
in the logic of incrementing and decrementing the value of
use_relocatable_buffers.
Diffstat (limited to 'src/ralloc.c')
| -rw-r--r-- | src/ralloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ralloc.c b/src/ralloc.c index 2e4823dc6c1..b1a5982574f 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -757,7 +757,7 @@ r_alloc_sbrk (long int size) | |||
| 757 | if (! r_alloc_initialized) | 757 | if (! r_alloc_initialized) |
| 758 | r_alloc_init (); | 758 | r_alloc_init (); |
| 759 | 759 | ||
| 760 | if (! use_relocatable_buffers) | 760 | if (use_relocatable_buffers <= 0) |
| 761 | return (*real_morecore) (size); | 761 | return (*real_morecore) (size); |
| 762 | 762 | ||
| 763 | if (size == 0) | 763 | if (size == 0) |
| @@ -1204,12 +1204,12 @@ r_alloc_reset_variable (POINTER *old, POINTER *new) | |||
| 1204 | void | 1204 | void |
| 1205 | r_alloc_inhibit_buffer_relocation (int inhibit) | 1205 | r_alloc_inhibit_buffer_relocation (int inhibit) |
| 1206 | { | 1206 | { |
| 1207 | if (use_relocatable_buffers < 0) | 1207 | if (use_relocatable_buffers > 1) |
| 1208 | use_relocatable_buffers = 0; | 1208 | use_relocatable_buffers = 1; |
| 1209 | if (inhibit) | 1209 | if (inhibit) |
| 1210 | use_relocatable_buffers++; | ||
| 1211 | else if (use_relocatable_buffers > 0) | ||
| 1212 | use_relocatable_buffers--; | 1210 | use_relocatable_buffers--; |
| 1211 | else if (use_relocatable_buffers < 1) | ||
| 1212 | use_relocatable_buffers++; | ||
| 1213 | } | 1213 | } |
| 1214 | 1214 | ||
| 1215 | 1215 | ||