• Paul Eggert's avatar
    Simplify maybe_gc implementation · 26de2d42
    Paul Eggert authored
    * 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.
    26de2d42
alloc.c 203 KB