summaryrefslogtreecommitdiffstats
path: root/Modules/gcmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30860: Consolidate stateful runtime globals. (#3397)Eric Snow2017-09-081-213/+98
| | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)Eric Snow2017-09-061-96/+213
| | | Windows buildbots started failing due to include-related errors.
* bpo-30860: Consolidate stateful runtime globals. (#2594)Eric Snow2017-09-061-213/+96
| | | | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* Issue #20185: Converted the gc module to Argument Clinic.Serhiy Storchaka2017-02-041-98/+132
|
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-8/+4
| | | | possible. Patch is writen with Coccinelle.
* Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-1/+1
| | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-1/+1
| | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507.
* Don't run garbage collection on interpreter exit if it was explicitly disabledŁukasz Langa2016-09-101-0/+9
| | | | by the user.
* DTrace support: function calls, GC activity, line executionŁukasz Langa2016-09-101-0/+8
| | | | | | | | | | | | | | | | | | | Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc. Largely based by an initial patch by Jesús Cea Avión, with some influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's unification patch. Things deliberately left out for simplicity: - ustack helpers, I have no way of testing them at this point since they are Solaris-specific - PyFrameObject * in function__entry/function__return, this is SystemTap-specific - SPARC support - dynamic tracing - sys module dtrace facility introspection All of those might be added later.
* Issue #28003: Implement PEP 525 -- Asynchronous Generators.Yury Selivanov2016-09-091-0/+1
|
* Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-1/+1
| | | | private functions.
* Issue #22117: The gc module now uses _PyTime_t timestampVictor Stinner2015-03-271-6/+6
|
* Issue #22043: time.monotonic() is now always availableVictor Stinner2014-09-021-3/+3
| | | | | threading.Lock.acquire(), threading.RLock.acquire() and socket operations now use a monotonic clock, instead of the system clock, when a timeout is used.
* Cleanup other stats formatting code in gcmodule.cAntoine Pitrou2014-05-241-5/+3
|
* Issue #21555: simplify code in gcmodule.c by using the pytime.h functions ↵Antoine Pitrou2014-05-241-41/+9
| | | | | | instead of trying to call time.time() via the C API. Patch by Geoffrey Spear.
* Merge from 3.4.Tim Peters2014-05-081-11/+23
|\ | | | | | | | | | | Issue #21435: Segfault in gc with cyclic trash Changed the iteration logic in finalize_garbage() to tolerate objects vanishing from the list as a side effect of executing a finalizer.
| * Issue #21435: Segfault in gc with cyclic trashTim Peters2014-05-081-11/+23
| | | | | | | | | | Changed the iteration logic in finalize_garbage() to tolerate objects vanishing from the list as a side effect of executing a finalizer.
* | Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),Victor Stinner2014-05-021-4/+20
|/ | | | | | PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) and bytearray(int) are now using ``calloc()`` instead of ``malloc()`` for large objects which is faster and use less memory (until the bytearray buffer is filled with data).
* Issue #20315: Removed support for backward compatibility with early 2.x ↵Serhiy Storchaka2014-01-201-14/+0
|\ | | | | | | | | | | | | versions. Removed backward compatibility alias curses.window.nooutrefresh which should be removed in 2.3.
| * Issue #20315: Removed support for backward compatibility with early 2.x ↵Serhiy Storchaka2014-01-201-14/+0
| | | | | | | | versions.
| * remove trailing spaces.Gregory P. Smith2013-12-181-7/+7
| |
* | whatsnew for gc.get_stats, plus doc tweaks.R David Murray2013-12-261-0/+1
| | | | | | | | | | | | | | | | | | | | Clarified the "At the moment" wording, and added the get_stats entry in the module summary that Serhiy noted was missing at the end of issue 16351. Given that pydoc lists all the function docstrings, I'm not sure that module summary section is actually needed; but, it is probably better to address that when the module is converted to use Argument Clinic. In the meantime we should keep the list complete.
* | Replace an overly optimistic assert() in _PyGC_CollectNoFail with a simple ↵Antoine Pitrou2013-08-151-6/+13
| | | | | | | | guard.
* | In _PyGC_Fini(), lose the reference that was kept to the time moduleAntoine Pitrou2013-08-061-0/+1
| |
* | Issue #18112: PEP 442 implementation (safe object finalization).Antoine Pitrou2013-07-301-49/+107
| |
* | Issue #18408: PyObject_GC_NewVar() now raises SystemError exception if nitemsVictor Stinner2013-07-081-2/+9
| | | | | | | | is negative
* | gcmodule.c: strip trailing spacesVictor Stinner2013-07-081-7/+7
| |
* | Issue #17937: Try harder to collect cyclic garbage at shutdown.Antoine Pitrou2013-05-181-6/+25
| |
* | Backout c89febab4648 following private feedback by Guido.Antoine Pitrou2013-05-141-1/+4
| | | | | | | | (Issue #17807: Generators can now be finalized even when they are part of a reference cycle)
* | Issue #17807: Generators can now be finalized even when they are part of a ↵Antoine Pitrou2013-05-081-4/+1
| | | | | | | | reference cycle.
* | Issue #1545463: At shutdown, defer finalization of codec modules so that ↵Antoine Pitrou2013-05-081-3/+7
| | | | | | | | | | | | stderr remains usable. (should fix Windows buildbot failures on test_gc)
* | Issue #1545463: Global variables caught in reference cycles are now ↵Antoine Pitrou2013-05-061-1/+7
| | | | | | | | garbage-collected at shutdown.
* | Issue #16351: New function gc.get_stats() returns per-generation collection ↵Antoine Pitrou2012-10-301-0/+64
|/ | | | statistics.
* Issue #14775: Fix a potential quadratic dict build-up due to the garbage ↵Antoine Pitrou2012-05-281-3/+57
|\ | | | | | | | | | | collector repeatedly trying to untrack dicts. Additional comments by Tim Silk.
| * Issue #14775: Fix a potential quadratic dict build-up due to the garbage ↵Antoine Pitrou2012-05-281-3/+57
| | | | | | | | | | | | collector repeatedly trying to untrack dicts. Additional comments by Tim Silk.
* | Issue #10576: Add a progress callback to gcmoduleKristján Valur Jónsson2012-04-151-6/+74
| |
* | Remove unused variable from gcmodule.c. The code no longer tests for theKristján Valur Jónsson2012-04-081-9/+0
| | | | | | | | presence of a __del__ attribute on objects, rather it uses the tp_del slot.
* | Issue #6695: Full garbage collection runs now clear the freelist of set objects.Antoine Pitrou2011-12-161-0/+1
| | | | | | | | Initial patch by Matthias Troffaes.
* | Issue #13389: Full garbage collection passes now clear the freelists forAntoine Pitrou2011-11-141-0/+2
| | | | | | | | | | list and dict objects. They already cleared other freelists in the interpreter.
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-1/+1
| |
* | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-1/+3
| | | | | | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* | Issue #10833: Use PyUnicode_FromFormat() and PyErr_Format() instead ofVictor Stinner2011-03-211-2/+2
|/ | | | PyOS_snprintf().
* Issue #10333: Remove ancient GC API, which has been deprecated sinceAntoine Pitrou2011-01-041-8/+0
| | | | Python 2.2.
* Issue #10279: fix test_gc under Win64.Antoine Pitrou2010-11-051-2/+2
|
* Add a new warning gategory, ResourceWarning, as discussed on python-dev. It ↵Georg Brandl2010-10-241-10/+10
| | | | | | | | is silent by default, except when configured --with-pydebug. Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
* Do not print additional shutdown message when gc.DEBUG_SAVEALL is setAntoine Pitrou2010-09-141-1/+2
|
* Issue #477863: Print a warning at shutdown if gc.garbage is not empty.Antoine Pitrou2010-08-081-9/+39
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-861/+861
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 80704 via svnmerge fromAntoine Pitrou2010-05-021-1/+1
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80704 | antoine.pitrou | 2010-05-02 21:51:14 +0200 (dim., 02 mai 2010) | 4 lines Issue #4687: Fix accuracy of garbage collection runtimes displayed with gc.DEBUG_STATS. ........
* Merged revisions ↵Benjamin Peterson2009-12-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 76847,76851,76869,76882,76891-76892,76924,77007,77070,77092,77096,77120,77126,77155 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76847 | benjamin.peterson | 2009-12-14 21:25:27 -0600 (Mon, 14 Dec 2009) | 1 line adverb ........ r76851 | benjamin.peterson | 2009-12-15 21:28:52 -0600 (Tue, 15 Dec 2009) | 1 line remove lib2to3 resource ........ r76869 | vinay.sajip | 2009-12-17 08:52:00 -0600 (Thu, 17 Dec 2009) | 1 line Issue #7529: logging: Minor correction to documentation. ........ r76882 | georg.brandl | 2009-12-19 11:30:28 -0600 (Sat, 19 Dec 2009) | 1 line #7527: use standard versionadded tags. ........ r76891 | georg.brandl | 2009-12-19 12:16:31 -0600 (Sat, 19 Dec 2009) | 1 line #7479: add note about function availability on Unices. ........ r76892 | georg.brandl | 2009-12-19 12:20:18 -0600 (Sat, 19 Dec 2009) | 1 line #7480: remove tautology. ........ r76924 | georg.brandl | 2009-12-20 08:28:05 -0600 (Sun, 20 Dec 2009) | 1 line Small indentation fix. ........ r77007 | gregory.p.smith | 2009-12-23 03:31:11 -0600 (Wed, 23 Dec 2009) | 3 lines Fix possible integer overflow in lchown and fchown functions. For issue1747858. ........ r77070 | amaury.forgeotdarc | 2009-12-27 14:06:44 -0600 (Sun, 27 Dec 2009) | 2 lines Fix a typo in comment ........ r77092 | georg.brandl | 2009-12-28 02:48:24 -0600 (Mon, 28 Dec 2009) | 1 line #7404: remove reference to non-existing example files. ........ r77096 | benjamin.peterson | 2009-12-28 14:51:17 -0600 (Mon, 28 Dec 2009) | 1 line document new fix_callable behavior ........ r77120 | georg.brandl | 2009-12-29 15:09:17 -0600 (Tue, 29 Dec 2009) | 1 line #7595: fix typo in argument default constant. ........ r77126 | amaury.forgeotdarc | 2009-12-29 17:06:17 -0600 (Tue, 29 Dec 2009) | 2 lines #7579: Add docstrings to the msvcrt module ........ r77155 | georg.brandl | 2009-12-30 13:03:00 -0600 (Wed, 30 Dec 2009) | 1 line We only support Windows NT derivatives now. ........