mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Fix Pyston speedups (#281)
We remove (i.e. hide behind a debug ifdef) the recursion checking methods, and the memory hooks and memory allocator methods. ASAN mode has no PYMALLOC, so we need a macro. Fix build break with des.c stack allocation.
This commit is contained in:
parent
2fe8571010
commit
57f0eed382
42 changed files with 260 additions and 63 deletions
4
third_party/python/Python/finalize.c
vendored
4
third_party/python/Python/finalize.c
vendored
|
@ -121,7 +121,7 @@ Py_FinalizeEx(void)
|
|||
_PyGC_CollectIfEnabled();
|
||||
#endif
|
||||
|
||||
#ifdef MODE_DBG
|
||||
#if IsModeDbg()
|
||||
/* Disable tracemalloc after all Python objects have been destroyed,
|
||||
so it is possible to use tracemalloc in objects destructor. */
|
||||
_PyTraceMalloc_Fini();
|
||||
|
@ -219,11 +219,13 @@ Py_FinalizeEx(void)
|
|||
_Py_PrintReferenceAddresses(stderr);
|
||||
#endif /* Py_TRACE_REFS */
|
||||
#ifdef WITH_PYMALLOC
|
||||
#if IsModeDbg()
|
||||
if (_PyMem_PymallocEnabled()) {
|
||||
char *opt = Py_GETENV("PYTHONMALLOCSTATS");
|
||||
if (opt != NULL && *opt != '\0')
|
||||
_PyObject_DebugMallocStats(stderr);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_Py_CallLlExitFuncs();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue