| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
* Fixed a leak when the GC fails to add an object with __del__ into
the gc.garbage list.
* PyGC_Collect() can now be called when an exception is set and
preserves it.
(cherry picked from commit 301e3cc8a5bc68c5347ab6ac6f83428000d31ab2)
|
| |
|
|
|
| |
(cherry picked from commit 1179f4b40f375af5c59cd4b6be9cc313fa0e1a37)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
| |
collector repeatedly trying to untrack dicts.
Additional comments by Tim Silk.
|
| | |
|
| |
|
|
| |
gc.DEBUG_STATS.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
| |
I changed some bytearray methods to use strings instead of unicode like bytes_repr
Also, bytearray.fromhex() can take strings as well as unicode
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
Patch by Neil Schemenauer, very slightly modified.
|
| | |
|
| |
|
|
|
| |
freelists. Changes their CompactFreeList apis into ClearFreeList apis and
calls them via gc.collect().
|
| |
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
|
| | |
|
| |
|
|
| |
collection of the highest generation.
|
| |
|
|
|
|
| |
imports by calling __import__ with an explicit level of 0
Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
|
| |
|
|
| |
Py_REFCNT. Macros for b/w compatibility are available.
|
| |
|
|
|
| |
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
|
| | |
|
| |
|
|
| |
with PyObject_CallFunctionObjArgs, which is 30% faster.
|
| |
|
|
|
|
|
|
|
|
| |
After the patch (45590) to add extra debug stats to the gc module, Python
was crashing on OpenBSD due to:
Fatal Python error: Interpreter not initialized (version mismatch?)
This seems to occur due to calling collect() when initialized (in pythonrun.c)
is set to 0. Now, the import will occur in the init function which
shouldn't suffer this problem.
|
| |
|
|
|
| |
Barry approved it awhile ago. Been sitting in my sandbox for awhile as
well.
|
| | |
|
| |
|
|
|
|
|
|
| |
that are suspended outside of any try/except/finally blocks to be
garbage collected even if they are part of a cycle. Generators that
suspend inside of an active try/except or try/finally block (including
those created by a ``with`` statement) are still not GC-able if they
are part of a cycle, however.
|
| | |
|
| |
|
|
|
| |
interpolate PY_FORMAT_SIZE_T instead of #if'ing on
MS_WIN64.
|
| | |
|
| |
|
|
|
|
| |
added to gc.collect(). Updated docs, unit test, and NEWS entry.
(Also, fixed a typo in NEWS.)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Probably should be backported.
|
| |
|
|
|
| |
method still needs to support string exceptions, and allow None for the
third argument. Documentation updates are needed, too.
|
| |
|
|
| |
Backport candidate.
|
| |
|
|
|
|
| |
nothing in gc currently cares, the original coding could screw up if,
e.g., you tried to move a node to the list it's already in, and the node
was already the last in its list.
|
| |
|
|
|
|
|
|
|
|
|
| |
Introduced gc_list_move(), which captures the common gc_list_remove() +
gc_list_append() sequence. In fact, no uses of gc_list_append() remained
(they were all in a gc_list_move() sequence), so commented that one out.
gc_list_merge(): assert that `from` != `to`; that was an implicit
precondition, now verified in a debug build.
Others: added comments about their purpose.
|
| |
|
|
| |
pass over the unreachable weakrefs-with-callbacks to unreachable objects.
|
| |
|
|
|
|
|
|
| |
In cyclic gc, clear weakrefs to unreachable objects before allowing any
Python code (weakref callbacks or __del__ methods) to run.
This is a critical bugfix, affecting all versions of Python since weakrefs
were introduced. I'll backport to 2.3.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Also SF patch 843455.
This is a critical bugfix.
I'll backport to 2.3 maint, but not beyond that. The bugs this fixes
have been there since weakrefs were introduced.
|
| |
|
|
|
|
|
|
| |
for this function has always claimed that was true, but it wasn't
verified before. For the latest batch of "double deallocation" bugs
(stemming from weakref callbacks invoked by way of subtype_dealloc),
this assert would have triggered (instead of waiting for
_Py_ForgetReference to die with a segfault later).
|
| |
|
|
|
|
| |
The embed2.diff patch solves the user's problem by exporting the missing
symbols from the Python core so Python can be embedded in another Cygwin
application (well, at lest vim).
|
| |
|
|
|
| |
- Call this in Py_Finalize().
- Expand the Misc/NEWS text on PY_LONG_LONG.
|
| | |
|
| |
|
|
| |
cases, wrote docs, added a test.
|
| | |
|