summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2020-07-23 13:48:43 +0200
committerPhilipp Stephani <phst@google.com>2020-07-23 14:03:27 +0200
commit5c5eb9790898e4ab10bcbbdb6871947ed3018569 (patch)
treedfdf20215168ca5f78ef66cecc092eccc28167c8 /lisp/emacs-lisp
parentfcd43287b3d36a5706760d68b7d88502ebe43a47 (diff)
downloademacs-5c5eb9790898e4ab10bcbbdb6871947ed3018569.tar.gz
emacs-5c5eb9790898e4ab10bcbbdb6871947ed3018569.tar.bz2
emacs-5c5eb9790898e4ab10bcbbdb6871947ed3018569.zip
Fix memory leak for global module objects (Bug#42482).
Instead of storing the global values in a global 'emacs_value_storage' object, store them as hash values alongside the reference counts. That way the garbage collector takes care of cleaning them up. * src/emacs-module.c (global_storage): Remove. (struct module_global_reference): New pseudovector type. (XMODULE_GLOBAL_REFERENCE): New helper function. (module_make_global_ref, module_free_global_ref): Use 'module_global_reference' struct for global reference values. (value_to_lisp, module_handle_nonlocal_exit): Adapt to deletion of 'global_storage'.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions