42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From 1f7d2d53f0e5b86e22e1dd116868bb69eeacb1a0 Mon Sep 17 00:00:00 2001
|
|
From: Ondřej Sur <oerdnj@isc-projects>
|
|
Date: Wed, 15 Dec 2021 08:25:42 PM GMT+0800
|
|
Subject: [PATCH] Disable the internal memory allocator by default
|
|
|
|
Conflict:NA
|
|
Reference:https://github.com/isc-projects/bind9/commit/1f7d2d53f0e5b86e22e1dd116868bb69eeacb1a0
|
|
|
|
---
|
|
bin/named/main.c | 1 +
|
|
lib/isc/include/isc/mem.h | 2 +-
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/bin/named/main.c b/bin/named/main.c
|
|
index f62f82c..c7c35ce 100644
|
|
--- a/bin/named/main.c
|
|
+++ b/bin/named/main.c
|
|
@@ -456,6 +456,7 @@ static struct flag_def {
|
|
{ "mctx", ISC_MEM_DEBUGCTX, false },
|
|
{ NULL, 0, false } },
|
|
mem_context_flags[] = { { "external", ISC_MEMFLAG_INTERNAL, true },
|
|
+ { "internal", ISC_MEMFLAG_INTERNAL, false },
|
|
{ "fill", ISC_MEMFLAG_FILL, false },
|
|
{ "nofill", ISC_MEMFLAG_FILL, true },
|
|
{ NULL, 0, false } };
|
|
diff --git a/lib/isc/include/isc/mem.h b/lib/isc/include/isc/mem.h
|
|
index 58e1d0e..b9f58fa 100644
|
|
--- a/lib/isc/include/isc/mem.h
|
|
+++ b/lib/isc/include/isc/mem.h
|
|
@@ -117,7 +117,7 @@ LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_defaultflags;
|
|
*/
|
|
|
|
#if !defined(ISC_MEM_USE_INTERNAL_MALLOC) && !__SANITIZE_ADDRESS__
|
|
-#define ISC_MEM_USE_INTERNAL_MALLOC 1
|
|
+#define ISC_MEM_USE_INTERNAL_MALLOC 0
|
|
#endif /* ifndef ISC_MEM_USE_INTERNAL_MALLOC */
|
|
|
|
/*
|
|
--
|
|
2.33.0
|
|
|