diff options
| author | Richard M. Stallman | 2005-10-30 07:36:35 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-10-30 07:36:35 +0000 |
| commit | 4d74a5fc8e917db49cfe2a0c66cd2b0b9a1b9e9b (patch) | |
| tree | 0dedd515e12c0e88db40773fdabef908a7654f02 /src | |
| parent | 932dc33bafe239bcde85a5c75509120e208d19c6 (diff) | |
| download | emacs-4d74a5fc8e917db49cfe2a0c66cd2b0b9a1b9e9b.tar.gz emacs-4d74a5fc8e917db49cfe2a0c66cd2b0b9a1b9e9b.zip | |
(BYTES_USED): Use uordblks, not arena.
(bytes_used_when_reconsidered): New variable.
(emacs_blocked_free): Set that.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/alloc.c | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f27a762b210..c6750bc70c0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,9 +1,17 @@ | |||
| 1 | 2005-10-30 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * alloc.c (BYTES_USED): Use uordblks, not arena. | ||
| 4 | (bytes_used_when_reconsidered): New variable. | ||
| 5 | (emacs_blocked_free): Set that. | ||
| 6 | |||
| 1 | 2005-10-29 Chong Yidong <cyd@stupidchicken.com> | 7 | 2005-10-29 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 8 | ||
| 3 | * alloc.c (emacs_blocked_free): Fix typo. | 9 | * alloc.c (emacs_blocked_free): Fix typo. |
| 4 | 10 | ||
| 5 | 2005-10-29 Richard M. Stallman <rms@gnu.org> | 11 | 2005-10-29 Richard M. Stallman <rms@gnu.org> |
| 6 | 12 | ||
| 13 | * data.c (Fmake_variable_frame_local): Doc fix. | ||
| 14 | |||
| 7 | * xdisp.c (handle_fontified_prop): Do nothing if memory full. | 15 | * xdisp.c (handle_fontified_prop): Do nothing if memory full. |
| 8 | (format_mode_line_unwind_data): New arg SAVE_PROPTRANS | 16 | (format_mode_line_unwind_data): New arg SAVE_PROPTRANS |
| 9 | controls whether to save and restore mode_line_proptrans_alist. | 17 | controls whether to save and restore mode_line_proptrans_alist. |
diff --git a/src/alloc.c b/src/alloc.c index 90ef4ba4e81..5f4026b4cfb 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -138,6 +138,8 @@ static pthread_mutex_t alloc_mutex; | |||
| 138 | 138 | ||
| 139 | static __malloc_size_t bytes_used_when_full; | 139 | static __malloc_size_t bytes_used_when_full; |
| 140 | 140 | ||
| 141 | static __malloc_size_t bytes_used_when_reconsidered; | ||
| 142 | |||
| 141 | /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer | 143 | /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer |
| 142 | to a struct Lisp_String. */ | 144 | to a struct Lisp_String. */ |
| 143 | 145 | ||
| @@ -521,7 +523,7 @@ display_malloc_warning () | |||
| 521 | 523 | ||
| 522 | 524 | ||
| 523 | #ifdef DOUG_LEA_MALLOC | 525 | #ifdef DOUG_LEA_MALLOC |
| 524 | # define BYTES_USED (mallinfo ().arena) | 526 | # define BYTES_USED (mallinfo ().uordblks) |
| 525 | #else | 527 | #else |
| 526 | # define BYTES_USED _bytes_used | 528 | # define BYTES_USED _bytes_used |
| 527 | #endif | 529 | #endif |
| @@ -1179,7 +1181,7 @@ emacs_blocked_free (ptr, ptr2) | |||
| 1179 | The code here is correct as long as SPARE_MEMORY | 1181 | The code here is correct as long as SPARE_MEMORY |
| 1180 | is substantially larger than the block size malloc uses. */ | 1182 | is substantially larger than the block size malloc uses. */ |
| 1181 | && (bytes_used_when_full | 1183 | && (bytes_used_when_full |
| 1182 | > ((bytes_used_now = BYTES_USED) | 1184 | > ((bytes_used_when_reconsidered = BYTES_USED) |
| 1183 | + max (malloc_hysteresis, 4) * SPARE_MEMORY))) | 1185 | + max (malloc_hysteresis, 4) * SPARE_MEMORY))) |
| 1184 | refill_memory_reserve (); | 1186 | refill_memory_reserve (); |
| 1185 | 1187 | ||