diff options
| author | Joakim Verona | 2012-07-27 02:22:03 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-07-27 02:22:03 +0200 |
| commit | 5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f (patch) | |
| tree | 5c55f1096a656a9759f0b53a0b5d1a2289bd366f /src/ralloc.c | |
| parent | 0c5c85cf2b350c965bb1ffa5b2d77c2adebc406b (diff) | |
| parent | 562157c814037dcba58a20cd6908a95992c22283 (diff) | |
| download | emacs-5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f.tar.gz emacs-5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f.zip | |
upstream
Diffstat (limited to 'src/ralloc.c')
| -rw-r--r-- | src/ralloc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ralloc.c b/src/ralloc.c index 19d15664eec..c40258693f5 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -396,7 +396,7 @@ get_bloc (SIZE size) | |||
| 396 | register bloc_ptr new_bloc; | 396 | register bloc_ptr new_bloc; |
| 397 | register heap_ptr heap; | 397 | register heap_ptr heap; |
| 398 | 398 | ||
| 399 | if (! (new_bloc = (bloc_ptr) malloc (BLOC_PTR_SIZE)) | 399 | if (! (new_bloc = malloc (BLOC_PTR_SIZE)) |
| 400 | || ! (new_bloc->data = obtain (break_value, size))) | 400 | || ! (new_bloc->data = obtain (break_value, size))) |
| 401 | { | 401 | { |
| 402 | free (new_bloc); | 402 | free (new_bloc); |
| @@ -741,7 +741,7 @@ r_alloc_sbrk (long int size) | |||
| 741 | if (! r_alloc_initialized) | 741 | if (! r_alloc_initialized) |
| 742 | r_alloc_init (); | 742 | r_alloc_init (); |
| 743 | 743 | ||
| 744 | if (! use_relocatable_buffers) | 744 | if (use_relocatable_buffers <= 0) |
| 745 | return (*real_morecore) (size); | 745 | return (*real_morecore) (size); |
| 746 | 746 | ||
| 747 | if (size == 0) | 747 | if (size == 0) |
| @@ -1142,12 +1142,12 @@ r_alloc_reset_variable (POINTER *old, POINTER *new) | |||
| 1142 | void | 1142 | void |
| 1143 | r_alloc_inhibit_buffer_relocation (int inhibit) | 1143 | r_alloc_inhibit_buffer_relocation (int inhibit) |
| 1144 | { | 1144 | { |
| 1145 | if (use_relocatable_buffers < 0) | 1145 | if (use_relocatable_buffers > 1) |
| 1146 | use_relocatable_buffers = 0; | 1146 | use_relocatable_buffers = 1; |
| 1147 | if (inhibit) | 1147 | if (inhibit) |
| 1148 | use_relocatable_buffers++; | ||
| 1149 | else if (use_relocatable_buffers > 0) | ||
| 1150 | use_relocatable_buffers--; | 1148 | use_relocatable_buffers--; |
| 1149 | else if (use_relocatable_buffers < 1) | ||
| 1150 | use_relocatable_buffers++; | ||
| 1151 | } | 1151 | } |
| 1152 | 1152 | ||
| 1153 | 1153 | ||