diff options
| author | Dmitry Antipov | 2012-07-20 09:28:00 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-07-20 09:28:00 +0400 |
| commit | 765e61e391ee0937ff6b30510b6c4651064fe38e (patch) | |
| tree | 6f8cfef58d32ed81e2219fc69b1c5c5027c8cce8 /src/bytecode.c | |
| parent | 89dea803ea4293eb8d14b87067d1e3eebdcbd180 (diff) | |
| download | emacs-765e61e391ee0937ff6b30510b6c4651064fe38e.tar.gz emacs-765e61e391ee0937ff6b30510b6c4651064fe38e.zip | |
Cleanup calls to Fgarbage_collect.
* lisp.h (maybe_gc): New prototype.
(consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
Remove declarations.
* alloc.c (maybe_gc): New function.
(consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
Make them static.
* bytecode.c (MAYBE_GC): Use maybe_gc.
* eval.c (eval_sub, Ffuncall): Likewise.
* keyboard.c (read_char): Likewise. Adjust call to maybe_gc
to avoid dependency from auto-save feature.
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index acdf809971f..dca1e552dd0 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -423,15 +423,11 @@ unmark_byte_stack (void) | |||
| 423 | /* Garbage collect if we have consed enough since the last time. | 423 | /* Garbage collect if we have consed enough since the last time. |
| 424 | We do this at every branch, to avoid loops that never GC. */ | 424 | We do this at every branch, to avoid loops that never GC. */ |
| 425 | 425 | ||
| 426 | #define MAYBE_GC() \ | 426 | #define MAYBE_GC() \ |
| 427 | do { \ | 427 | do { \ |
| 428 | if (consing_since_gc > gc_cons_threshold \ | 428 | BEFORE_POTENTIAL_GC (); \ |
| 429 | && consing_since_gc > gc_relative_threshold) \ | 429 | maybe_gc (); \ |
| 430 | { \ | 430 | AFTER_POTENTIAL_GC (); \ |
| 431 | BEFORE_POTENTIAL_GC (); \ | ||
| 432 | Fgarbage_collect (); \ | ||
| 433 | AFTER_POTENTIAL_GC (); \ | ||
| 434 | } \ | ||
| 435 | } while (0) | 431 | } while (0) |
| 436 | 432 | ||
| 437 | /* Check for jumping out of range. */ | 433 | /* Check for jumping out of range. */ |