@@ -25,7 +25,7 @@ struct _PyTraceMalloc_Config {
2525 } initialized ;
2626
2727 /* Is tracemalloc tracing memory allocations?
28- Variable protected by the GIL */
28+ Variable protected by the TABLES_LOCK(). */
2929 int tracing ;
3030
3131 /* limit of the number of frames in a traceback, 1 by default.
@@ -85,14 +85,14 @@ struct _tracemalloc_runtime_state {
8585 size_t peak_traced_memory ;
8686 /* Hash table used as a set to intern filenames:
8787 PyObject* => PyObject*.
88- Protected by the GIL */
88+ Protected by the TABLES_LOCK(). */
8989 _Py_hashtable_t * filenames ;
9090 /* Buffer to store a new traceback in traceback_new().
91- Protected by the GIL . */
91+ Protected by the TABLES_LOCK() . */
9292 struct tracemalloc_traceback * traceback ;
9393 /* Hash table used as a set to intern tracebacks:
9494 traceback_t* => traceback_t*
95- Protected by the GIL */
95+ Protected by the TABLES_LOCK(). */
9696 _Py_hashtable_t * tracebacks ;
9797 /* pointer (void*) => trace (trace_t*).
9898 Protected by TABLES_LOCK(). */
@@ -144,7 +144,7 @@ extern PyObject* _PyTraceMalloc_GetTraces(void);
144144extern PyObject * _PyTraceMalloc_GetObjectTraceback (PyObject * obj );
145145
146146/* Initialize tracemalloc */
147- extern int _PyTraceMalloc_Init (void );
147+ extern PyStatus _PyTraceMalloc_Init (void );
148148
149149/* Start tracemalloc */
150150extern int _PyTraceMalloc_Start (int max_nframe );
0 commit comments