| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,6 @@ PyAPI_FUNC(int) _Py_IsLocaleCoercionTarget(const char *ctype_loc); | |||
| 31 | 31 | ||
| 32 | 32 | extern void _Py_InitVersion(void); | |
| 33 | 33 | extern PyStatus _PyFaulthandler_Init(int enable); | |
| 34 | - extern int _PyTraceMalloc_Init(int enable); | ||
| 35 | 34 | extern PyObject * _PyBuiltin_Init(PyInterpreterState *interp); | |
| 36 | 35 | extern PyStatus _PySys_Create( | |
| 37 | 36 | PyThreadState *tstate, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,6 +33,40 @@ PyAPI_FUNC(int) PyTraceMalloc_Untrack( | |||
| 33 | 33 | PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback( | |
| 34 | 34 | unsigned int domain, | |
| 35 | 35 | uintptr_t ptr); | |
| 36 | + | ||
| 37 | + /* Return non-zero if tracemalloc is tracing */ | ||
| 38 | + PyAPI_FUNC(int) _PyTraceMalloc_IsTracing(void); | ||
| 39 | + | ||
| 40 | + /* Clear the tracemalloc traces */ | ||
| 41 | + PyAPI_FUNC(void) _PyTraceMalloc_ClearTraces(void); | ||
| 42 | + | ||
| 43 | + /* Clear the tracemalloc traces */ | ||
| 44 | + PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetTraces(void); | ||
| 45 | + | ||
| 46 | + /* Clear tracemalloc traceback for an object */ | ||
| 47 | + PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetObjectTraceback(PyObject *obj); | ||
| 48 | + | ||
| 49 | + /* Initialize tracemalloc */ | ||
| 50 | + PyAPI_FUNC(int) _PyTraceMalloc_Init(void); | ||
| 51 | + | ||
| 52 | + /* Start tracemalloc */ | ||
| 53 | + PyAPI_FUNC(int) _PyTraceMalloc_Start(int max_nframe); | ||
| 54 | + | ||
| 55 | + /* Stop tracemalloc */ | ||
| 56 | + PyAPI_FUNC(void) _PyTraceMalloc_Stop(void); | ||
| 57 | + | ||
| 58 | + /* Get the tracemalloc traceback limit */ | ||
| 59 | + PyAPI_FUNC(int) _PyTraceMalloc_GetTracebackLimit(void); | ||
| 60 | + | ||
| 61 | + /* Get the memory usage of tracemalloc in bytes */ | ||
| 62 | + PyAPI_FUNC(size_t) _PyTraceMalloc_GetMemory(void); | ||
| 63 | + | ||
| 64 | + /* Get the current size and peak size of traced memory blocks as a 2-tuple */ | ||
| 65 | + PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetTracedMemory(void); | ||
| 66 | + | ||
| 67 | + /* Set the peak size of traced memory blocks to the current size */ | ||
| 68 | + PyAPI_FUNC(void) _PyTraceMalloc_ResetPeak(void); | ||
| 69 | + | ||
| 36 | 70 | #endif | |
| 37 | 71 | ||
| 38 | 72 | #endif /* !Py_TRACEMALLOC_H */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -421,6 +421,7 @@ PYTHON_OBJS= \ | |||
| 421 | 421 | Python/sysmodule.o \ | |
| 422 | 422 | Python/thread.o \ | |
| 423 | 423 | Python/traceback.o \ | |
| 424 | + Python/tracemalloc.o \ | ||
| 424 | 425 | Python/getopt.o \ | |
| 425 | 426 | Python/pystrcmp.o \ | |
| 426 | 427 | Python/pystrtod.o \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + Move the core functionality of the ``tracemalloc`` module in the ``Python/`` | ||
| 2 | + folder, leaving just the module wrapper in ``Modules/``. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments