Skip to content

Commit 2b0ef8b

Browse files
committed
log leaked allocations in tracking provider
1 parent a0c1e48 commit 2b0ef8b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/provider/provider_tracking.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,8 @@ static umf_result_t trackingFree(void *hProvider, void *ptr, size_t size) {
729729

730730
if (umfMemoryTrackerAdd(p->hTracker, p->pool, ptr, size) !=
731731
UMF_RESULT_SUCCESS) {
732-
LOG_ERR(
733-
"cannot add memory back to the tracker, ptr = %p, size = %zu",
734-
ptr, size);
732+
LOG_ERR("cannot add memory back to the tracker, ptr=%p, size=%zu",
733+
ptr, size);
735734
}
736735
return ret;
737736
}
@@ -770,6 +769,10 @@ static void check_if_tracker_is_empty(umf_memory_tracker_handle_t hTracker,
770769
FIND_G, &rkey, (void **)&rvalue)) {
771770
if (rvalue->pool == pool || pool == NULL) {
772771
n_items++;
772+
LOG_DEBUG(
773+
"found abandoned allocation in the tracking provider: "
774+
"pool=%p, ptr=%p, size=%zu",
775+
(void *)rvalue->pool, (void *)rkey, (size_t)rvalue->size);
773776
}
774777

775778
last_key = rkey;

0 commit comments

Comments
 (0)