diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-07-20 19:40:03 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-07-20 20:13:46 -0700 |
commit | 5018b663c6c0d31f27fb44630a69d9e0bd73273d (patch) | |
tree | e256994675a86333f69cbfc045f82e0460fd2a97 /src/emacs-module.c | |
parent | 26de2d42d0460c5b193456950a568cb04a29dc00 (diff) | |
download | emacs-5018b663c6c0d31f27fb44630a69d9e0bd73273d.tar.gz emacs-5018b663c6c0d31f27fb44630a69d9e0bd73273d.tar.bz2 emacs-5018b663c6c0d31f27fb44630a69d9e0bd73273d.zip |
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.
Diffstat (limited to 'src/emacs-module.c')
0 files changed, 0 insertions, 0 deletions