comparison 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
comparison
equal deleted inserted replaced
87400:9e4d8552cee7 87401:6e2089dbc5ad
103 extern int _PyLong_Init(void); 103 extern int _PyLong_Init(void);
104 extern void PyLong_Fini(void); 104 extern void PyLong_Fini(void);
105 extern int _PyFaulthandler_Init(void); 105 extern int _PyFaulthandler_Init(void);
106 extern void _PyFaulthandler_Fini(void); 106 extern void _PyFaulthandler_Fini(void);
107 extern void _PyHash_Fini(void); 107 extern void _PyHash_Fini(void);
108 extern int _PyTraceMalloc_Init(void);
108 109
109 #ifdef WITH_THREAD 110 #ifdef WITH_THREAD
110 extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *); 111 extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *);
111 extern void _PyGILState_Fini(void); 112 extern void _PyGILState_Fini(void);
112 #endif /* WITH_THREAD */ 113 #endif /* WITH_THREAD */
451 if (initfsencoding(interp) < 0) 452 if (initfsencoding(interp) < 0)
452 Py_FatalError("Py_Initialize: unable to load the file system codec"); 453 Py_FatalError("Py_Initialize: unable to load the file system codec");
453 454
454 if (install_sigs) 455 if (install_sigs)
455 initsigs(); /* Signal handling stuff, including initintr() */ 456 initsigs(); /* Signal handling stuff, including initintr() */
457
458 if (_PyTraceMalloc_Init() < 0)
459 Py_FatalError("Py_Initialize: can't initialize tracemalloc");
456 460
457 initmain(interp); /* Module __main__ */ 461 initmain(interp); /* Module __main__ */
458 if (initstdio() < 0) 462 if (initstdio() < 0)
459 Py_FatalError( 463 Py_FatalError(
460 "Py_Initialize: can't initialize sys standard streams"); 464 "Py_Initialize: can't initialize sys standard streams");