diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/alloc.c b/src/alloc.c index 3ed8cc2d990..5bb528c64ab 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -376,7 +376,7 @@ struct gcpro *gcprolist; | |||
| 376 | /* Addresses of staticpro'd variables. Initialize it to a nonzero | 376 | /* Addresses of staticpro'd variables. Initialize it to a nonzero |
| 377 | value; otherwise some compilers put it into BSS. */ | 377 | value; otherwise some compilers put it into BSS. */ |
| 378 | 378 | ||
| 379 | #define NSTATICS 0x650 | 379 | #define NSTATICS 0x800 |
| 380 | static Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag}; | 380 | static Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag}; |
| 381 | 381 | ||
| 382 | /* Index of next unused slot in staticvec. */ | 382 | /* Index of next unused slot in staticvec. */ |
| @@ -3100,7 +3100,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT | |||
| 3100 | ptrdiff_t i; | 3100 | ptrdiff_t i; |
| 3101 | register struct Lisp_Vector *p; | 3101 | register struct Lisp_Vector *p; |
| 3102 | 3102 | ||
| 3103 | /* We used to purecopy everything here, if purify-flga was set. This worked | 3103 | /* We used to purecopy everything here, if purify-flag was set. This worked |
| 3104 | OK for Emacs-23, but with Emacs-24's lexical binding code, it can be | 3104 | OK for Emacs-23, but with Emacs-24's lexical binding code, it can be |
| 3105 | dangerous, since make-byte-code is used during execution to build | 3105 | dangerous, since make-byte-code is used during execution to build |
| 3106 | closures, so any closure built during the preload phase would end up | 3106 | closures, so any closure built during the preload phase would end up |
| @@ -5030,7 +5030,7 @@ staticpro (Lisp_Object *varaddress) | |||
| 5030 | { | 5030 | { |
| 5031 | staticvec[staticidx++] = varaddress; | 5031 | staticvec[staticidx++] = varaddress; |
| 5032 | if (staticidx >= NSTATICS) | 5032 | if (staticidx >= NSTATICS) |
| 5033 | emacs_abort (); | 5033 | fatal ("NSTATICS too small; try increasing and recompiling Emacs."); |
| 5034 | } | 5034 | } |
| 5035 | 5035 | ||
| 5036 | 5036 | ||
| @@ -5689,7 +5689,7 @@ mark_object (Lisp_Object arg) | |||
| 5689 | pvectype = ((ptr->header.size & PVEC_TYPE_MASK) | 5689 | pvectype = ((ptr->header.size & PVEC_TYPE_MASK) |
| 5690 | >> PSEUDOVECTOR_SIZE_BITS); | 5690 | >> PSEUDOVECTOR_SIZE_BITS); |
| 5691 | else | 5691 | else |
| 5692 | pvectype = 0; | 5692 | pvectype = PVEC_NORMAL_VECTOR; |
| 5693 | 5693 | ||
| 5694 | if (pvectype != PVEC_SUBR && pvectype != PVEC_BUFFER) | 5694 | if (pvectype != PVEC_SUBR && pvectype != PVEC_BUFFER) |
| 5695 | CHECK_LIVE (live_vector_p); | 5695 | CHECK_LIVE (live_vector_p); |
| @@ -6311,19 +6311,14 @@ gc_sweep (void) | |||
| 6311 | 6311 | ||
| 6312 | /* Free all unmarked buffers */ | 6312 | /* Free all unmarked buffers */ |
| 6313 | { | 6313 | { |
| 6314 | register struct buffer *buffer = all_buffers, *prev = 0, *next; | 6314 | register struct buffer *buffer, **bprev = &all_buffers; |
| 6315 | 6315 | ||
| 6316 | total_buffers = 0; | 6316 | total_buffers = 0; |
| 6317 | while (buffer) | 6317 | for (buffer = all_buffers; buffer; buffer = *bprev) |
| 6318 | if (!VECTOR_MARKED_P (buffer)) | 6318 | if (!VECTOR_MARKED_P (buffer)) |
| 6319 | { | 6319 | { |
| 6320 | if (prev) | 6320 | *bprev = buffer->header.next.buffer; |
| 6321 | prev->header.next = buffer->header.next; | ||
| 6322 | else | ||
| 6323 | all_buffers = buffer->header.next.buffer; | ||
| 6324 | next = buffer->header.next.buffer; | ||
| 6325 | lisp_free (buffer); | 6321 | lisp_free (buffer); |
| 6326 | buffer = next; | ||
| 6327 | } | 6322 | } |
| 6328 | else | 6323 | else |
| 6329 | { | 6324 | { |
| @@ -6331,7 +6326,7 @@ gc_sweep (void) | |||
| 6331 | /* Do not use buffer_(set|get)_intervals here. */ | 6326 | /* Do not use buffer_(set|get)_intervals here. */ |
| 6332 | buffer->text->intervals = balance_intervals (buffer->text->intervals); | 6327 | buffer->text->intervals = balance_intervals (buffer->text->intervals); |
| 6333 | total_buffers++; | 6328 | total_buffers++; |
| 6334 | prev = buffer, buffer = buffer->header.next.buffer; | 6329 | bprev = &buffer->header.next.buffer; |
| 6335 | } | 6330 | } |
| 6336 | } | 6331 | } |
| 6337 | 6332 | ||