diff options
author | Philipp Stephani <phst@google.com> | 2020-07-23 13:48:43 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2020-07-31 18:05:18 +0200 |
commit | 8ecca2f09f6bc387412f258c4fc4e3ddf807b2b3 (patch) | |
tree | 0b0703e5b5e5a0bbc345e5123b395f777ee0508f /lisp/emacs-lisp | |
parent | e12d1fbc1568cc90b3b99bb6b9f244e5d10e97a4 (diff) | |
download | emacs-8ecca2f09f6bc387412f258c4fc4e3ddf807b2b3.tar.gz emacs-8ecca2f09f6bc387412f258c4fc4e3ddf807b2b3.tar.bz2 emacs-8ecca2f09f6bc387412f258c4fc4e3ddf807b2b3.zip |
Backport: 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'.
(cherry picked from commit 5c5eb9790898e4ab10bcbbdb6871947ed3018569)
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions