From dcc2152fdc097614a818f75612199c619cf62c0b Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 21 Apr 2021 15:24:04 +0800 Subject: [PATCH] Log other pointer info when me_total_c isn't zero since it's not good to assume the table size double MEMORY_TABLE_SIZE Signed-off-by: Xiang Xiao Change-Id: I1bf2ad2c0dafac1559daf882a23868bc071a3a70 --- dmalloc_tab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmalloc_tab.c b/dmalloc_tab.c index a40b3864..b858ed87 100644 --- a/dmalloc_tab.c +++ b/dmalloc_tab.c @@ -701,7 +701,7 @@ void _dmalloc_table_log_info(mem_table_t *mem_table, const int log_n, add_entry(&total, entry_p); } } - if (mem_table->mt_in_use_c >= MEMORY_TABLE_SIZE) { + if (mem_table->mt_other_pointers.me_total_c) { strncpy(source, "Other pointers", sizeof(source)); source[sizeof(source) - 1] = '\0'; log_entry(&mem_table->mt_other_pointers, in_use_column_b, source);