Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-19 09:50:42

0001 #ifndef Py_LIMITED_API
0002 #ifndef Py_TRACEMALLOC_H
0003 #define Py_TRACEMALLOC_H
0004 #ifdef __cplusplus
0005 extern "C" {
0006 #endif
0007 
0008 /* Track an allocated memory block in the tracemalloc module.
0009    Return 0 on success, return -1 on error (failed to allocate memory to store
0010    the trace).
0011 
0012    Return -2 if tracemalloc is disabled.
0013 
0014    If memory block is already tracked, update the existing trace. */
0015 PyAPI_FUNC(int) PyTraceMalloc_Track(
0016     unsigned int domain,
0017     uintptr_t ptr,
0018     size_t size);
0019 
0020 /* Untrack an allocated memory block in the tracemalloc module.
0021    Do nothing if the block was not tracked.
0022 
0023    Return -2 if tracemalloc is disabled, otherwise return 0. */
0024 PyAPI_FUNC(int) PyTraceMalloc_Untrack(
0025     unsigned int domain,
0026     uintptr_t ptr);
0027 
0028 #ifdef __cplusplus
0029 }
0030 #endif
0031 #endif  // !Py_TRACEMALLOC_H
0032 #endif  // !Py_LIMITED_API