codekingpro/portable-devtools
115k
1#ifndef Py_LIMITED_API2#ifndef Py_TRACEMALLOC_H3#define Py_TRACEMALLOC_H4#ifdef __cplusplus5extern "C" {6#endif7 8/* Track an allocated memory block in the tracemalloc module.9 Return 0 on success, return -1 on error (failed to allocate memory to store10 the trace).11 12 Return -2 if tracemalloc is disabled.13 14 If memory block is already tracked, update the existing trace. */15PyAPI_FUNC(int) PyTraceMalloc_Track(16 unsigned int domain,17 uintptr_t ptr,18 size_t size);19 20/* Untrack an allocated memory block in the tracemalloc module.21 Do nothing if the block was not tracked.22 23 Return -2 if tracemalloc is disabled, otherwise return 0. */24PyAPI_FUNC(int) PyTraceMalloc_Untrack(25 unsigned int domain,26 uintptr_t ptr);27 28#ifdef __cplusplus29}30#endif31#endif // !Py_TRACEMALLOC_H32#endif // !Py_LIMITED_API33 