• Paul Eggert's avatar
    Inhibit GC after inhibit_garbage_collection · 5018b663
    Paul Eggert authored
    Without this patch, there are unlikely ways that garbage
    collection could occur (sometimes causing undefined behavior)
    even when inhibit_garbage_collection is in effect.
    * src/alloc.c (garbage_collection_inhibited): New var.
    (pure_alloc): Increment it if pure space is exhausted, so that
    garbage_collect_1 no longer needs to inspect
    pure_bytes_used_before_overflow.
    (allow_garbage_collection): New function.
    (inhibit_garbage_collection): Increment the new variable rather
    than specbinding a user variable.
    (garbage_collect_1): Do not garbage collect if the new variable
    is set, rather than if pure_bytes_used_before_overflow is set.
    5018b663
alloc.c 203 KB