summaryrefslogtreecommitdiff
path: root/libc/malloc_debug/malloc_debug.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-04-02 14:24:47 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-04-02 14:24:47 -0700
commit2fb7b814b087b116542bee9b76c42a1d8829f9bc (patch)
treee2bfac0a476bfe1f8fb84e5e1ac34cc65061ea55 /libc/malloc_debug/malloc_debug.cpp
parent7e2220eed3360e39949535070a6ee474bb2a5ef0 (diff)
parent8e1ffaf89fb7821d9abca52faa8927fed11caa19 (diff)
Merge "Disable info messages by default for malloc debug." am: e6fd53b751 am: f2905f4ce3
am: 8e1ffaf89f Change-Id: I64fd19ded1111960c8080f7c7f9eea84ca99651c
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
-rw-r--r--libc/malloc_debug/malloc_debug.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/malloc_debug/malloc_debug.cpp b/libc/malloc_debug/malloc_debug.cpp
index 093bdee8c..114579626 100644
--- a/libc/malloc_debug/malloc_debug.cpp
+++ b/libc/malloc_debug/malloc_debug.cpp
@@ -30,6 +30,7 @@
#include <inttypes.h>
#include <malloc.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/cdefs.h>
#include <sys/param.h>
@@ -252,6 +253,10 @@ bool debug_initialize(const MallocDispatch* malloc_dispatch, int* malloc_zygote_
// of different error cases.
backtrace_startup();
+ if (g_debug->config().options() & VERBOSE) {
+ info_log("%s: malloc debug enabled", getprogname());
+ }
+
return true;
}