Skip to content

Commit 24ea805

Browse files
reorder
1 parent 702ea95 commit 24ea805

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/tracemalloc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,9 @@ _PyTraceMalloc_Stop(void)
866866
goto done;
867867
}
868868

869+
/* stop tracing Python memory allocations */
870+
_Py_atomic_store_int_relaxed(&tracemalloc_config.tracing, 0);
871+
869872
/* unregister the hook on memory allocators */
870873
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);
871874
PyMem_SetAllocator(PYMEM_DOMAIN_MEM, &allocators.mem);
@@ -879,9 +882,6 @@ _PyTraceMalloc_Stop(void)
879882

880883
(void)PyRefTracer_SetTracer(NULL, NULL);
881884

882-
/* stop tracing Python memory allocations */
883-
_Py_atomic_store_int_relaxed(&tracemalloc_config.tracing, 0);
884-
885885
done:
886886
TABLES_UNLOCK();
887887
}

0 commit comments

Comments
 (0)