[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 638ef45: Don’t default to Valgrind unless ENABLE_CHECKING
From: |
Paul Eggert |
Subject: |
master 638ef45: Don’t default to Valgrind unless ENABLE_CHECKING |
Date: |
Wed, 3 Jun 2020 22:00:09 -0400 (EDT) |
branch: master
commit 638ef457876c14b9d713e2fa991f5db3ad53c4f9
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Don’t default to Valgrind unless ENABLE_CHECKING
* src/alloc.c (USE_VALGRIND): If not defined, don’t default it to
1 unless ENABLE_CHECKING. The Valgrind hooks bloat the garbage
collector a bit in production, and there’s no need for them these
days if one has a Valgrind suppressions file (which one needs anyway).
(mark_maybe_pointer): Use ‘#if USE_VALGRIND’ instead of ‘#ifdef
USE_VALGRIND’ for consistency with other uses of USE_VALGRIND.
This is in case someone builds with ‘-DENABLE_CHECKING
-DUSE_VALGRIND=0’ in CFLAGS.
---
src/alloc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index 573bac0..f44f22b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -67,7 +67,8 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
# include <malloc.h>
#endif
-#if defined HAVE_VALGRIND_VALGRIND_H && !defined USE_VALGRIND
+#if (defined ENABLE_CHECKING \
+ && defined HAVE_VALGRIND_VALGRIND_H && !defined USE_VALGRIND)
# define USE_VALGRIND 1
#endif
@@ -4694,7 +4695,7 @@ mark_maybe_pointer (void *p)
{
struct mem_node *m;
-#ifdef USE_VALGRIND
+#if USE_VALGRIND
VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p));
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 638ef45: Don’t default to Valgrind unless ENABLE_CHECKING,
Paul Eggert <=