]> git.eshelyaron.com Git - emacs.git/commit
Inhibit GC after inhibit_garbage_collection
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)
commit5018b663c6c0d31f27fb44630a69d9e0bd73273d
treee256994675a86333f69cbfc045f82e0460fd2a97
parent26de2d42d0460c5b193456950a568cb04a29dc00
Inhibit GC after inhibit_garbage_collection

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.
src/alloc.c