From e9a86416c68240e1894d32e158cdf2abb5c4e477 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 24 Sep 2014 15:59:13 +0400 Subject: [PATCH] * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX && __GNUC__ && !__clang__. Mention known problems. Adjust comment. --- src/ChangeLog | 3 +++ src/lisp.h | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ec4f051f483..9e4492d2c90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -36,6 +36,9 @@ (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA. * keymap.c (append_key): Use scoped_list1. + * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX + && __GNUC__ && !__clang__. Mention known problems. Adjust comment. + 2014-09-24 Paul Eggert Fix some slow uses and misuses of strcat. diff --git a/src/lisp.h b/src/lisp.h index deb4635d035..836557e492e 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -282,7 +282,16 @@ error !; # endif #endif +/* This should work on GNU/Linux with GCC. Other configurations may be + problematic and/or not tested yet. Clang is known to have problems, + see http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00506.html. + Also http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00422.html + describes an issues with 32-bit MS-Windows. */ #ifndef USE_STACK_LISP_OBJECTS +# if defined (GNU_LINUX) && defined (__GNUC__) && !defined (__clang__) +# define USE_STACK_LISP_OBJECTS true +# endif +#else # define USE_STACK_LISP_OBJECTS false #endif @@ -4581,8 +4590,10 @@ extern void *record_xmalloc (size_t) ATTRIBUTE_ALLOC_SIZE ((1)); better performance because GC is not involved. This feature is experimental and requires careful debugging. - Brave users can compile with CPPFLAGS='-DUSE_STACK_LISP_OBJECTS' - to get into the game. */ + It's enabled by default on GNU/Linux with GCC. On other systems, + brave users can compile with CPPFLAGS='-DUSE_STACK_LISP_OBJECTS' + to get into the game. Also note that this feature requires + GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS. */ /* A struct Lisp_Cons inside a union that is no larger and may be better-aligned. */ -- 2.39.5