diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-20 09:28:00 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-20 09:28:00 +0400 |
commit | 765e61e391ee0937ff6b30510b6c4651064fe38e (patch) | |
tree | 6f8cfef58d32ed81e2219fc69b1c5c5027c8cce8 /src/bytecode.c | |
parent | 89dea803ea4293eb8d14b87067d1e3eebdcbd180 (diff) | |
download | emacs-765e61e391ee0937ff6b30510b6c4651064fe38e.tar.gz |
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) /* Garbage collect if we have consed enough since the last time. We do this at every branch, to avoid loops that never GC. */ -#define MAYBE_GC() \ - do { \ - if (consing_since_gc > gc_cons_threshold \ - && consing_since_gc > gc_relative_threshold) \ - { \ - BEFORE_POTENTIAL_GC (); \ - Fgarbage_collect (); \ - AFTER_POTENTIAL_GC (); \ - } \ +#define MAYBE_GC() \ + do { \ + BEFORE_POTENTIAL_GC (); \ + maybe_gc (); \ + AFTER_POTENTIAL_GC (); \ } while (0) /* Check for jumping out of range. */ |