comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/python3.8/tracemalloc.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 69:33d812a61356
1 #ifndef Py_TRACEMALLOC_H
2 #define Py_TRACEMALLOC_H
3
4 #ifndef Py_LIMITED_API
5 /* Track an allocated memory block in the tracemalloc module.
6 Return 0 on success, return -1 on error (failed to allocate memory to store
7 the trace).
8
9 Return -2 if tracemalloc is disabled.
10
11 If memory block is already tracked, update the existing trace. */
12 PyAPI_FUNC(int) PyTraceMalloc_Track(
13 unsigned int domain,
14 uintptr_t ptr,
15 size_t size);
16
17 /* Untrack an allocated memory block in the tracemalloc module.
18 Do nothing if the block was not tracked.
19
20 Return -2 if tracemalloc is disabled, otherwise return 0. */
21 PyAPI_FUNC(int) PyTraceMalloc_Untrack(
22 unsigned int domain,
23 uintptr_t ptr);
24
25 /* Get the traceback where a memory block was allocated.
26
27 Return a tuple of (filename: str, lineno: int) tuples.
28
29 Return None if the tracemalloc module is disabled or if the memory block
30 is not tracked by tracemalloc.
31
32 Raise an exception and return NULL on error. */
33 PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback(
34 unsigned int domain,
35 uintptr_t ptr);
36 #endif
37
38 #endif /* !Py_TRACEMALLOC_H */