diff options
| author | Paul Eggert | 2017-11-02 21:02:12 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-11-02 21:02:12 -0700 |
| commit | aa7542467238b06ed056054965ba444595b85453 (patch) | |
| tree | 3071c15ff777ef5727ccd254d9ddbf513a06c0cc /src/alloc.c | |
| parent | 5fcfdf433d74e8ecb35f86fdc071ce11ca0b0364 (diff) | |
| parent | a87ce5c4b41ca8146c764b1186a6162c069b1933 (diff) | |
| download | emacs-aa7542467238b06ed056054965ba444595b85453.tar.gz emacs-aa7542467238b06ed056054965ba444595b85453.zip | |
Merge from origin/emacs-26
a87ce5c4b4 * src/lisp.h (GCALIGNED): Clarify comment (Bug#29040).
8a31e9993f ; etc/NEWS: Add cpp-message-min-time-interval. (Bug#28961)
ac0bb9a192 Improve the doc of eshell-cmpl-* custom variables (Bug#25069)
36400c7dc9 Fix mouse-scrollbar offset on GNUstep and old macOS (bug#2...
04bc1410c2 Merge from Gnulib
6b08ad5263 Fix alignment portability problems
a9f8706fa8 Fix completion of colon after CSS property (Bug#29056)
9031dec527 ; * src/alloc.c (sweep_symbols): Fix last change.
fdd3dcfa4e * src/alloc.c (sweep_symbols): Tweak last change
27964af438 In frame parameters documentation mention desktop saving/r...
1bd4e7c243 ; Fix typo in ChangeLog.3
4182a60d31 Don't have frameset save the 'client' parameter (Bug#29067)
9d31a97092 ; Spelling fixes
460a25f212 Handle generic variables in cl-defgeneric Edebug spec
dc0a25c2f9 Give a more sensible message if file-attributes fails (Bug...
8453423c7c Avoid wrong value from file-attributes on Linux kernel bef...
70621e2571 Fix customization of debugger-print-function (Bug#29077)
# Conflicts:
# etc/NEWS
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c index 11afdfd7cc0..0fc79fe68ac 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -621,6 +621,12 @@ buffer_memory_full (ptrdiff_t nbytes) | |||
| 621 | #endif | 621 | #endif |
| 622 | } | 622 | } |
| 623 | 623 | ||
| 624 | /* A common multiple of the positive integers A and B. Ideally this | ||
| 625 | would be the least common multiple, but there's no way to do that | ||
| 626 | as a constant expression in C, so do the best that we can easily do. */ | ||
| 627 | #define COMMON_MULTIPLE(a, b) \ | ||
| 628 | ((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b)) | ||
| 629 | |||
| 624 | #ifndef XMALLOC_OVERRUN_CHECK | 630 | #ifndef XMALLOC_OVERRUN_CHECK |
| 625 | #define XMALLOC_OVERRUN_CHECK_OVERHEAD 0 | 631 | #define XMALLOC_OVERRUN_CHECK_OVERHEAD 0 |
| 626 | #else | 632 | #else |
| @@ -7024,10 +7030,16 @@ sweep_symbols (void) | |||
| 7024 | { | 7030 | { |
| 7025 | if (!sym->s.gcmarkbit) | 7031 | if (!sym->s.gcmarkbit) |
| 7026 | { | 7032 | { |
| 7027 | if (sym->s.redirect == SYMBOL_LOCALIZED | 7033 | if (sym->s.redirect == SYMBOL_LOCALIZED) |
| 7028 | /* Already freed? */ | 7034 | { |
| 7029 | && !EQ (sym->s.function, Vdead)) | 7035 | xfree (SYMBOL_BLV (&sym->s)); |
| 7030 | xfree (SYMBOL_BLV (&sym->s)); | 7036 | /* At every GC we sweep all symbol_blocks and rebuild the |
| 7037 | symbol_free_list, so those symbols which stayed unused | ||
| 7038 | between the two will be re-swept. | ||
| 7039 | So we have to make sure we don't re-free this blv next | ||
| 7040 | time we sweep this symbol_block (bug#29066). */ | ||
| 7041 | sym->s.redirect = SYMBOL_PLAINVAL; | ||
| 7042 | } | ||
| 7031 | sym->s.next = symbol_free_list; | 7043 | sym->s.next = symbol_free_list; |
| 7032 | symbol_free_list = &sym->s; | 7044 | symbol_free_list = &sym->s; |
| 7033 | symbol_free_list->function = Vdead; | 7045 | symbol_free_list->function = Vdead; |