Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 87401:6e2089dbc5ad
Issue #18874: Implement the PEP 454 (tracemalloc)
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Sat, 23 Nov 2013 12:27:24 +0100 |
| parents | adb471b9cba1 |
| children | cc8953ea3c7e |
line wrap: on
line diff
--- a/Python/pythonrun.c Sat Nov 23 03:33:00 2013 -0800 +++ b/Python/pythonrun.c Sat Nov 23 12:27:24 2013 +0100 @@ -105,6 +105,7 @@ extern int _PyFaulthandler_Init(void); extern void _PyFaulthandler_Fini(void); extern void _PyHash_Fini(void); +extern int _PyTraceMalloc_Init(void); #ifdef WITH_THREAD extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *); @@ -454,6 +455,9 @@ if (install_sigs) initsigs(); /* Signal handling stuff, including initintr() */ + if (_PyTraceMalloc_Init() < 0) + Py_FatalError("Py_Initialize: can't initialize tracemalloc"); + initmain(interp); /* Module __main__ */ if (initstdio() < 0) Py_FatalError(
