Skip to content

Commit 166f400

Browse files
mergify[bot]Julien Danjou
andauthored
refactor(profiling/heap): do not use global heap tracker (#3167) (#3179)
This should use the heap tracker passed as argument. Since there's only one heap tracker currently, this does not change anything in practice. Co-authored-by: Kyle Verhoog <[email protected]> (cherry picked from commit 4ac3353) Co-authored-by: Julien Danjou <[email protected]>
1 parent 3a04de7 commit 166f400

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ddtrace/profiling/collector/_memalloc_heap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ heap_tracker_untrack_thawed(heap_tracker_t* heap_tracker, void* ptr)
7777
of the time this is where the untracked ptr is (the most recent object
7878
get de-allocated first usually). This might be a good enough
7979
trade-off. */
80-
for (TRACEBACK_ARRAY_COUNT_TYPE i = global_heap_tracker.allocs.count; i > 0; i--) {
81-
traceback_t** tb = &global_heap_tracker.allocs.tab[i - 1];
80+
for (TRACEBACK_ARRAY_COUNT_TYPE i = heap_tracker->allocs.count; i > 0; i--) {
81+
traceback_t** tb = &heap_tracker->allocs.tab[i - 1];
8282

8383
if (ptr == (*tb)->ptr) {
8484
/* Free the traceback */

0 commit comments

Comments
 (0)