diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-23 11:27:24 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-23 11:27:24 (GMT) |
commit | ed3b0bca3ef9d7bdbb8bd8e67e60e85f5a336da0 (patch) | |
tree | fd4390855d293372f73048fdf4b3e6b4a7cdf440 /Python | |
parent | 0fb6072fad411eba171b53037bcc04d07c7b0770 (diff) | |
download | cpython-ed3b0bca3ef9d7bdbb8bd8e67e60e85f5a336da0.zip cpython-ed3b0bca3ef9d7bdbb8bd8e67e60e85f5a336da0.tar.gz cpython-ed3b0bca3ef9d7bdbb8bd8e67e60e85f5a336da0.tar.bz2 |
Issue #18874: Implement the PEP 454 (tracemalloc)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pythonrun.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index b5d57df..3adbbd7 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -105,6 +105,7 @@ extern void PyLong_Fini(void); 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 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib) 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( |