summaryrefslogtreecommitdiffstats
path: root/Modules/gcmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 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. ........
* Merged revisions 70546 via svnmerge fromAntoine Pitrou2009-03-231-1/+29
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70546 | antoine.pitrou | 2009-03-23 19:41:45 +0100 (lun., 23 mars 2009) | 9 lines Issue #4688: Add a heuristic so that tuples and dicts containing only untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes. (trivia: this makes the "binary_trees" benchmark from the Computer Language Shootout 40% faster) ........
* Merged revisions 68462 via svnmerge fromAntoine Pitrou2009-01-091-1/+65
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68462 | antoine.pitrou | 2009-01-09 22:40:55 +0100 (ven., 09 janv. 2009) | 6 lines Issue #4074: Change the criteria for doing a full garbage collection (i.e. collecting the oldest generation) so that allocating lots of objects without destroying them does not show quadratic performance. Based on a proposal by Martin von Löwis at http://mail.python.org/pipermail/python-dev/2008-June/080579.html. ........
* Merged revisions 67832 via svnmerge fromAntoine Pitrou2008-12-171-23/+26
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67832 | antoine.pitrou | 2008-12-17 23:46:54 +0100 (mer., 17 déc. 2008) | 4 lines Issue #2467: gc.DEBUG_STATS reports invalid elapsed times. Patch by Neil Schemenauer, very slightly modified. ........
* Closes release blocker #3627.Neal Norwitz2008-08-241-1/+6
| | | | | | | | | | | | | Merged revisions 65335 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt) ........ r65335 | neal.norwitz | 2008-07-31 10:17:14 -0700 (Thu, 31 Jul 2008) | 1 line Security patches from Apple: prevent int overflow when allocating memory ........
* Merged revisions ↵Georg Brandl2008-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64722,64729,64753,64845-64846,64849,64871,64880-64882,64885,64888,64897,64900-64901,64915,64926-64929,64938-64941,64944,64961,64966,64973 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64722 | georg.brandl | 2008-07-05 12:13:36 +0200 (Sat, 05 Jul 2008) | 4 lines #2663: support an *ignore* argument to shutil.copytree(). Patch by Tarek Ziade. This is a new feature, but Barry authorized adding it in the beta period. ........ r64729 | mark.dickinson | 2008-07-05 13:33:52 +0200 (Sat, 05 Jul 2008) | 5 lines Issue 3188: accept float('infinity') as well as float('inf'). This makes the float constructor behave in the same way as specified by various other language standards, including C99, IEEE 754r, and the IBM Decimal standard. ........ r64753 | gregory.p.smith | 2008-07-06 05:35:58 +0200 (Sun, 06 Jul 2008) | 4 lines - Issue #2862: Make int and float freelist management consistent with other freelists. Changes their CompactFreeList apis into ClearFreeList apis and calls them via gc.collect(). ........ r64845 | raymond.hettinger | 2008-07-10 16:03:19 +0200 (Thu, 10 Jul 2008) | 1 line Issue 3301: Bisect functions behaved badly when lo was negative. ........ r64846 | raymond.hettinger | 2008-07-10 16:34:57 +0200 (Thu, 10 Jul 2008) | 1 line Issue 3285: Fractions from_float() and from_decimal() accept Integral arguments. ........ r64849 | andrew.kuchling | 2008-07-10 16:43:31 +0200 (Thu, 10 Jul 2008) | 1 line Wording changes ........ r64871 | raymond.hettinger | 2008-07-11 14:00:21 +0200 (Fri, 11 Jul 2008) | 1 line Add cautionary note on the use of PySequence_Fast_ITEMS. ........ r64880 | amaury.forgeotdarc | 2008-07-11 23:28:25 +0200 (Fri, 11 Jul 2008) | 5 lines #3317 in zipfile module, restore the previous names of global variables: some applications relied on them. Also remove duplicated lines. ........ r64881 | amaury.forgeotdarc | 2008-07-11 23:45:06 +0200 (Fri, 11 Jul 2008) | 3 lines #3342: In tracebacks, printed source lines were not indented since r62555. #3343: Py_DisplaySourceLine should be a private function. Rename it to _Py_DisplaySourceLine. ........ r64882 | josiah.carlson | 2008-07-12 00:17:14 +0200 (Sat, 12 Jul 2008) | 2 lines Fix for the AttributeError in test_asynchat. ........ r64885 | josiah.carlson | 2008-07-12 01:26:59 +0200 (Sat, 12 Jul 2008) | 2 lines Fixed test for asyncore. ........ r64888 | matthias.klose | 2008-07-12 09:51:48 +0200 (Sat, 12 Jul 2008) | 2 lines - Fix bashisms in Tools/faqwiz/move-faqwiz.sh ........ r64897 | benjamin.peterson | 2008-07-12 22:16:19 +0200 (Sat, 12 Jul 2008) | 1 line fix various doc typos #3320 ........ r64900 | alexandre.vassalotti | 2008-07-13 00:06:53 +0200 (Sun, 13 Jul 2008) | 2 lines Fixed typo. ........ r64901 | benjamin.peterson | 2008-07-13 01:41:19 +0200 (Sun, 13 Jul 2008) | 1 line #1778443 robotparser fixes from Aristotelis Mikropoulos ........ r64915 | nick.coghlan | 2008-07-13 16:52:36 +0200 (Sun, 13 Jul 2008) | 1 line Fix issue 3221 by emitting a RuntimeWarning instead of raising SystemError when the parent module can't be found during an absolute import (likely due to non-PEP 361 aware code which sets a module level __package__ attribute) ........ r64926 | martin.v.loewis | 2008-07-13 22:31:49 +0200 (Sun, 13 Jul 2008) | 2 lines Add turtle into the module index. ........ r64927 | alexandre.vassalotti | 2008-07-13 22:42:44 +0200 (Sun, 13 Jul 2008) | 3 lines Issue #3274: Use a less common identifier for the temporary variable in Py_CLEAR(). ........ r64928 | andrew.kuchling | 2008-07-13 23:43:25 +0200 (Sun, 13 Jul 2008) | 1 line Re-word ........ r64929 | andrew.kuchling | 2008-07-13 23:43:52 +0200 (Sun, 13 Jul 2008) | 1 line Add various items; move ctypes items into a subsection of their own ........ r64938 | andrew.kuchling | 2008-07-14 02:35:32 +0200 (Mon, 14 Jul 2008) | 1 line Typo fixes ........ r64939 | andrew.kuchling | 2008-07-14 02:40:55 +0200 (Mon, 14 Jul 2008) | 1 line Typo fix ........ r64940 | andrew.kuchling | 2008-07-14 03:18:16 +0200 (Mon, 14 Jul 2008) | 1 line Typo fix ........ r64941 | andrew.kuchling | 2008-07-14 03:18:31 +0200 (Mon, 14 Jul 2008) | 1 line Expand the multiprocessing section ........ r64944 | gregory.p.smith | 2008-07-14 08:06:48 +0200 (Mon, 14 Jul 2008) | 7 lines Fix posix.fork1() / os.fork1() to only call PyOS_AfterFork() in the child process rather than both parent and child. Does anyone actually use fork1()? It appears to be a Solaris thing but if Python is built with pthreads on Solaris, fork1() and fork() should be the same. ........ r64961 | jesse.noller | 2008-07-15 15:47:33 +0200 (Tue, 15 Jul 2008) | 1 line multiprocessing/connection.py patch to remove fqdn oddness for issue 3270 ........ r64966 | nick.coghlan | 2008-07-15 17:40:22 +0200 (Tue, 15 Jul 2008) | 1 line Add missing NEWS entry for r64962 ........ r64973 | jesse.noller | 2008-07-15 20:29:18 +0200 (Tue, 15 Jul 2008) | 1 line Revert 3270 patch: self._address is in pretty widespread use, need to revisit ........
* Fix some broken URLs to GC design discussions.Neil Schemenauer2008-07-151-3/+8
|
* Implement PEP 3121: new module initialization and finalization API.Martin v. Löwis2008-06-111-10/+21
|