#include "asan_interceptors.h"
#include "asan_internal.h"
#include "asan_stats.h"
#include "asan_thread.h"
#include "sanitizer_common/sanitizer_allocator_interface.h"
#include "sanitizer_common/sanitizer_mutex.h"
#include "sanitizer_common/sanitizer_stackdepot.h"
namespace __asan {
AsanStats::AsanStats() { … }
void AsanStats::Clear() { … }
static void PrintMallocStatsArray(const char *prefix,
uptr (&array)[kNumberOfSizeClasses]) { … }
void AsanStats::Print() { … }
void AsanStats::MergeFrom(const AsanStats *stats) { … }
static Mutex print_lock;
static AsanStats unknown_thread_stats(LINKER_INITIALIZED);
static AsanStats dead_threads_stats(LINKER_INITIALIZED);
static Mutex dead_threads_stats_lock;
static uptr max_malloced_memory;
static void MergeThreadStats(ThreadContextBase *tctx_base, void *arg) { … }
static void GetAccumulatedStats(AsanStats *stats) { … }
void FlushToDeadThreadStats(AsanStats *stats) { … }
void FillMallocStatistics(AsanMallocStats *malloc_stats) { … }
AsanStats &GetCurrentThreadStats() { … }
static void PrintAccumulatedStats() { … }
}
usingnamespace__asan;
uptr __sanitizer_get_current_allocated_bytes() { … }
uptr __sanitizer_get_heap_size() { … }
uptr __sanitizer_get_free_bytes() { … }
uptr __sanitizer_get_unmapped_bytes() { … }
void __asan_print_accumulated_stats() { … }