summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-05-16 23:04:02 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-05-16 23:04:02 +0000
commitaafa3d0e4623f3c57c7abe66f6afa726b9cde348 (patch)
treea5bc47536edf62b73e36a4335a8b84f39a7e216e
parent58b52fb133ee4f8a82d3da5c439ca7b9d2caa2bf (diff)
parent6b7987cca3e28381a3471804811210cdc5617cc3 (diff)
downloadbionic-aafa3d0e4623f3c57c7abe66f6afa726b9cde348.zip
bionic-aafa3d0e4623f3c57c7abe66f6afa726b9cde348.tar.gz
bionic-aafa3d0e4623f3c57c7abe66f6afa726b9cde348.tar.bz2
Merge "Hide various debug malloc implementation details."
-rw-r--r--libc/bionic/malloc_debug_common.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libc/bionic/malloc_debug_common.cpp b/libc/bionic/malloc_debug_common.cpp
index 356ecb1..1c9f51a 100644
--- a/libc/bionic/malloc_debug_common.cpp
+++ b/libc/bionic/malloc_debug_common.cpp
@@ -54,8 +54,8 @@
*/
int gMallocLeakZygoteChild = 0;
-pthread_mutex_t g_allocations_mutex = PTHREAD_MUTEX_INITIALIZER;
-HashTable g_hash_table;
+__LIBC_HIDDEN__ pthread_mutex_t g_allocations_mutex = PTHREAD_MUTEX_INITIALIZER;
+__LIBC_HIDDEN__ HashTable g_hash_table;
// =============================================================================
// output functions
@@ -113,7 +113,7 @@ static int hash_entry_compare(const void* arg1, const void* arg2) {
* not include heap overhead
* "*backtraceSize" is set to the maximum number of entries in the back trace
*/
-extern "C" void get_malloc_leak_info(uint8_t** info, size_t* overallSize,
+extern "C" __LIBC_HIDDEN__ void get_malloc_leak_info(uint8_t** info, size_t* overallSize,
size_t* infoSize, size_t* totalMemory, size_t* backtraceSize) {
// don't do anything if we have invalid arguments
if (info == NULL || overallSize == NULL || infoSize == NULL ||
@@ -182,7 +182,7 @@ extern "C" void get_malloc_leak_info(uint8_t** info, size_t* overallSize,
dlfree(list);
}
-extern "C" void free_malloc_leak_info(uint8_t* info) {
+extern "C" __LIBC_HIDDEN__ void free_malloc_leak_info(uint8_t* info) {
dlfree(info);
}
@@ -286,11 +286,11 @@ static void* libc_malloc_impl_handle = NULL;
* backlog we use to detect multiple frees. If the property is not set, the
* backlog length defaults to BACKLOG_DEFAULT_LEN.
*/
-unsigned int g_malloc_debug_backlog;
+__LIBC_HIDDEN__ unsigned int g_malloc_debug_backlog;
#define BACKLOG_DEFAULT_LEN 100
/* The value of libc.debug.malloc. */
-int g_malloc_debug_level;
+__LIBC_HIDDEN__ int g_malloc_debug_level;
template<typename FunctionType>
static void InitMallocFunction(void* malloc_impl_handler, FunctionType* func, const char* prefix, const char* suffix) {