]> git.eshelyaron.com Git - emacs.git/commit
Simplify maybe_gc implementation
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 Jul 2019 02:40:03 +0000 (19:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 Jul 2019 03:13:46 +0000 (20:13 -0700)
commit26de2d42d0460c5b193456950a568cb04a29dc00
tree4631c2f8901f2c9fa3cdfc266279c1667103c238
parentdf5024dbaef5e1f7e39a2a8268523f9fc1af3118
Simplify maybe_gc implementation

* src/alloc.c (consing_until_gc): New variable, replacing the
combination of consing_since_gc and gc_relative_threshold.
All uses changed.
(byte_ct): Move decl here from lisp.h.
(memory_full_cons_threshold): New an enum constant.
(free_cons): Check for integer overflow in
statistics calculation.
* src/lisp.h (object_ct): Move decl here from alloc.c.
(OBJECT_CT_MAX): New macro.
(maybe_gc): Simplify accordingly.
src/alloc.c
src/lisp.h