Mercurial > repos > rliterman > csp2
annotate 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 |
rev | line source |
---|---|
jpayne@69 | 1 #ifndef Py_TRACEMALLOC_H |
jpayne@69 | 2 #define Py_TRACEMALLOC_H |
jpayne@69 | 3 |
jpayne@69 | 4 #ifndef Py_LIMITED_API |
jpayne@69 | 5 /* Track an allocated memory block in the tracemalloc module. |
jpayne@69 | 6 Return 0 on success, return -1 on error (failed to allocate memory to store |
jpayne@69 | 7 the trace). |
jpayne@69 | 8 |
jpayne@69 | 9 Return -2 if tracemalloc is disabled. |
jpayne@69 | 10 |
jpayne@69 | 11 If memory block is already tracked, update the existing trace. */ |
jpayne@69 | 12 PyAPI_FUNC(int) PyTraceMalloc_Track( |
jpayne@69 | 13 unsigned int domain, |
jpayne@69 | 14 uintptr_t ptr, |
jpayne@69 | 15 size_t size); |
jpayne@69 | 16 |
jpayne@69 | 17 /* Untrack an allocated memory block in the tracemalloc module. |
jpayne@69 | 18 Do nothing if the block was not tracked. |
jpayne@69 | 19 |
jpayne@69 | 20 Return -2 if tracemalloc is disabled, otherwise return 0. */ |
jpayne@69 | 21 PyAPI_FUNC(int) PyTraceMalloc_Untrack( |
jpayne@69 | 22 unsigned int domain, |
jpayne@69 | 23 uintptr_t ptr); |
jpayne@69 | 24 |
jpayne@69 | 25 /* Get the traceback where a memory block was allocated. |
jpayne@69 | 26 |
jpayne@69 | 27 Return a tuple of (filename: str, lineno: int) tuples. |
jpayne@69 | 28 |
jpayne@69 | 29 Return None if the tracemalloc module is disabled or if the memory block |
jpayne@69 | 30 is not tracked by tracemalloc. |
jpayne@69 | 31 |
jpayne@69 | 32 Raise an exception and return NULL on error. */ |
jpayne@69 | 33 PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback( |
jpayne@69 | 34 unsigned int domain, |
jpayne@69 | 35 uintptr_t ptr); |
jpayne@69 | 36 #endif |
jpayne@69 | 37 |
jpayne@69 | 38 #endif /* !Py_TRACEMALLOC_H */ |