emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 dac64e3: Avoid optimizing out the last_marked[] a


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 dac64e3: Avoid optimizing out the last_marked[] array
Date: Tue, 11 Oct 2016 11:39:48 +0000 (UTC)

branch: emacs-25
commit dac64e35ddd203be2b841e65cf16e11ce9b1be6a
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Avoid optimizing out the last_marked[] array
    
    * src/alloc.c <last_marked>: No longer 'static', to avoid having
    it optimized out in optimized builds, which then makes debugging
    GC problems harder.
---
 src/alloc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/alloc.c b/src/alloc.c
index c7f58a8..c5ae8b5 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6014,7 +6014,9 @@ mark_glyph_matrix (struct glyph_matrix *matrix)
    all the references contained in it.  */
 
 #define LAST_MARKED_SIZE 500
-static Lisp_Object last_marked[LAST_MARKED_SIZE];
+/* This is not static to prevent it from being optimized away in an
+   optimized build, which then makes debugging GC problems harder.  */
+Lisp_Object last_marked[LAST_MARKED_SIZE];
 static int last_marked_index;
 
 /* For debugging--call abort when we cdr down this many



reply via email to

[Prev in Thread] Current Thread [Next in Thread]