qcacmn: Use ksize to update kmalloc counters under memory debug
qdf_mem_malloc/free wrappers are using ksize to update the kmalloc counters of the driver whereas the debug versions of this wrappers are using requested size itself. To figure out the actual dynamic memory held by the driver on the debug profile, use ksize for debug versions as well. Change-Id: I4311f9a450e3fa3e04ac45b1bf7f36a7ff677057 CRs-Fixed: 2449995
This commit is contained in:

committed by
nshrivas

parent
8e8f71952b
commit
92e3f61248
@@ -1009,7 +1009,7 @@ void *qdf_mem_malloc_debug(size_t size, const char *func, uint32_t line,
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
qdf_err("Failed to insert memory header; status %d", status);
|
||||
|
||||
qdf_mem_kmalloc_inc(size);
|
||||
qdf_mem_kmalloc_inc(ksize(header));
|
||||
|
||||
return ptr;
|
||||
}
|
||||
@@ -1048,7 +1048,7 @@ void qdf_mem_free_debug(void *ptr, const char *func, uint32_t line)
|
||||
qdf_mem_header_assert_valid(header, current_domain, error_bitmap,
|
||||
func, line);
|
||||
|
||||
qdf_mem_kmalloc_dec(header->size);
|
||||
qdf_mem_kmalloc_dec(ksize(header));
|
||||
kfree(header);
|
||||
}
|
||||
qdf_export_symbol(qdf_mem_free_debug);
|
||||
|
Reference in New Issue
Block a user