diff options
Diffstat (limited to 'libc/malloc_debug/PointerData.cpp')
-rw-r--r-- | libc/malloc_debug/PointerData.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libc/malloc_debug/PointerData.cpp b/libc/malloc_debug/PointerData.cpp index 4f81ff7ff..a15b1b13a 100644 --- a/libc/malloc_debug/PointerData.cpp +++ b/libc/malloc_debug/PointerData.cpp @@ -197,7 +197,10 @@ void PointerData::Add(const void* ptr, size_t pointer_size) { uintptr_t pointer = reinterpret_cast<uintptr_t>(ptr); size_t hash_index = 0; if (backtrace_enabled_) { - hash_index = AddBacktrace(g_debug->config().backtrace_frames()); + if ((pointer_size >= g_min_alloc_to_record) && + (pointer_size <= g_max_alloc_to_record)) { + hash_index = AddBacktrace(g_debug->config().backtrace_frames()); + } } std::lock_guard<std::mutex> pointer_guard(pointer_mutex_); |