summaryrefslogtreecommitdiff
path: root/src/emacs-module.h.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-08-29 14:35:37 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-08-29 14:58:49 -0700
commite13bdfee1742a7cc1eff5dc3bfbe2d71ea3532ef (patch)
tree2ee472fe616200a44f1c88fb21c1717c215893f8 /src/emacs-module.h.in
parent9baeed3514fe60189f3bf935c380da92659b7f59 (diff)
downloademacs-e13bdfee1742a7cc1eff5dc3bfbe2d71ea3532ef.tar.gz
Make garbage collection more conservative
Check for a pointer anywhere within the object, as opposed to just the start of the object. This is needed for gcc -Os -flto on x86-64 (Bug#28213). This change means that the garbage collector is more conservative, and will incorrectly keep objects that it does not need to, but that is better than incorrectly discarding objects that should be kept. * src/alloc.c (ADVANCE, VINDEX): Now functions, not macros; this is easier to debug. (setup_on_free_list): Rename from SETUP_ON_FREE_LIST. Now a function with two args, not a macro with three. All callers changed. (live_string_holding, live_cons_holding, live_symbol_holding) (live_misc_holding, live_vector_holding, live_buffer_holding): New functions, which check for any object containing the addressed byte, not just for an object at the given address. (live_string_p, live_cons_p, live_symbol_p, live_misc_p) (live_vector_p, live_buffer_p): Redefine in terms of the new functions. (live_float_p): Refactor slightly to match the new functions. (mark_maybe_object, mark_maybe_pointer): Use the new functions. Don’t bother checking mark bits, as mark_object already does that, and omitting the checks here simplifies the code. Although mark_maybe_object can continue to insist that tagged pointers still address the start of the object, mark_maybe_pointer now is more conservative and checks for pointers anywhere into an object.
Diffstat (limited to 'src/emacs-module.h.in')
0 files changed, 0 insertions, 0 deletions