| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
* Failure in adding to gc.garbage is no longer fatal.
* An exception in tp_clear() no longer lead to crash (though tp_clear() should not leave exceptions).
|
|
|
|
|
|
|
| |
* 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.
* Fixed an undefined behavior with comparing a dead pointer with NULL.
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 72a0d218dcc94a3cc409a9ef32dfcd5a7bbcb43c.
The reverted commit had a few issues so it was unanimously decided
to undo it. See the bpo issue for details.
|
| |
|
| |
|
|
|
|
| |
* Use wider types (int => Py_ssize_t) to avoid integer overflows.
* Fix gc.get_freeze_count(): use Py_ssize_t type rather than int, since gc_list_size() returns a Py_ssize_t.
|
|
|
|
| |
(#4370)
|
|
|
|
|
| |
Freeze all the objects tracked by gc - move them to a permanent generation
and ignore all the future collections. This can be used before a POSIX
fork() call to make the gc copy-on-write friendly or to speed up collection.
|
|
|
|
|
|
|
| |
* 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).
|
|
|
| |
Windows buildbots started failing due to include-related errors.
|
|
|
|
|
|
|
|
|
| |
* 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).
|
| |
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
|
|
|
|
|
| |
Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like
_PyObject_CallArg1() uses more stack memory than
PyObject_CallFunctionObjArgs().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
by the user.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
private functions.
|
| |
|
|
|
|
|
| |
threading.Lock.acquire(), threading.RLock.acquire() and socket operations now
use a monotonic clock, instead of the system clock, when a timeout is used.
|
| |
|
|
|
|
|
|
| |
instead of trying to call time.time() via the C API.
Patch by Geoffrey Spear.
|
|\
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Changed the iteration logic in finalize_garbage() to tolerate objects vanishing
from the list as a side effect of executing a finalizer.
|
|/
|
|
|
|
| |
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).
|
|\
| |
| |
| |
| |
| |
| | |
versions.
Removed backward compatibility alias curses.window.nooutrefresh which should
be removed in 2.3.
|
| |
| |
| |
| | |
versions.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
guard.
|
| | |
|
| | |
|
| |
| |
| |
| | |
is negative
|
| | |
|
| | |
|
| |
| |
| |
| | |
(Issue #17807: Generators can now be finalized even when they are part of a reference cycle)
|
| |
| |
| |
| | |
reference cycle.
|
| |
| |
| |
| |
| |
| | |
stderr remains usable.
(should fix Windows buildbot failures on test_gc)
|
| |
| |
| |
| | |
garbage-collected at shutdown.
|
|/
|
|
| |
statistics.
|
|\
| |
| |
| |
| |
| | |
collector repeatedly trying to untrack dicts.
Additional comments by Tim Silk.
|
| |
| |
| |
| |
| |
| | |
collector repeatedly trying to untrack dicts.
Additional comments by Tim Silk.
|
| | |
|
| |
| |
| |
| | |
presence of a __del__ attribute on objects, rather it uses the tp_del slot.
|
| |
| |
| |
| | |
Initial patch by Matthias Troffaes.
|
| |
| |
| |
| |
| | |
list and dict objects. They already cleared other freelists in the
interpreter.
|
| | |
|