summaryrefslogtreecommitdiffstats
path: root/Modules/_tracemalloc.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge 3.4 (tracemalloc typo)Victor Stinner2015-03-181-1/+1
|\
| * _tracemalloc.c: Fix typoVictor Stinner2015-03-181-1/+1
| |
* | Removed duplicated words in in comments and docs.Serhiy Storchaka2014-12-011-1/+1
|\ \ | |/
| * Removed duplicated words in in comments and docs.Serhiy Storchaka2014-12-011-1/+1
| |
* | Issue #22156: simplify _tracemalloc.c, use an int for the MAX_NFRAME constantVictor Stinner2014-08-161-6/+6
| |
* | Issue #22156: Fix some "comparison between signed and unsigned integers"Victor Stinner2014-08-151-5/+5
| | | | | | | | compiler warnings in the Modules/ subdirectory.
* | Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" toVictor Stinner2014-06-021-11/+11
| | | | | | | | | | make sure that the code using it will be adapted for the new "calloc" field (instead of crashing).
* | Issue #21639: Fix a division by zero in tracemalloc on calloc(0, 0). TheVictor Stinner2014-06-021-1/+1
|\ \ | |/ | | | | | | | | | | regression was introduced recently with the introduction of the new "calloc" functions (PyMem_RawCalloc, PyMem_Calloc, PyObject_Calloc). Add also a unit test to check for the non-regression.
* | Issue #21490: Add new C macros: Py_ABS() and Py_STRINGIFY()Victor Stinner2014-05-141-3/+0
| | | | | | | | | | Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between pyconfig.h and pymacros.h.
* | Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),Victor Stinner2014-05-021-10/+47
|/ | | | | | 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 #21036: Fix typo in macro nameVictor Stinner2014-03-241-1/+1
| | | | _PY_HASHTABLE_ENTRY_DATA => _Py_HASHTABLE_ENTRY_DATA
* Issue #20354: Fix alignment issue in the tracemalloc module on 64-bitVictor Stinner2014-02-011-1/+2
| | | | | | | | platforms. Bug seen on 64-bit Linux when using "make profile-opt". Only align the "frame_t" structure on 32-bit when Visual Studio is used. Before the alignment to 32-bit was applied to the whole file any compiler supporting "#pragma pack(4)" which includes GCC.
* tracemalloc: fix usage of strtol(), value can be LONG_MIN or LONG_MAX on ERANGEVictor Stinner2013-12-161-1/+2
|
* tracemalloc: only use unsigned types to compute hashVictor Stinner2013-12-161-5/+4
| | | | | Commit to simplify the backport to python 2.7 and to make the code more consistent.
* Issue #19787: PyThread_set_key_value() now always set the valueVictor Stinner2013-12-131-6/+3
| | | | | | | | | | In Python 3.3, PyThread_set_key_value() did nothing if the key already exists (if the current value is a non-NULL pointer). When _PyGILState_NoteThreadState() is called twice on the same thread with a different Python thread state, it still keeps the old Python thread state to keep the old behaviour. Replacing the Python thread state with the new state introduces new bugs: see issues #10915 and #15751.
* Backout changeset 46393019b650Victor Stinner2013-12-131-3/+6
| | | | test_capi is failing and the fix is not trivial, I prefer to revert
* Close #19787: PyThread_set_key_value() now always set the value. In Python 3.3,Victor Stinner2013-12-131-6/+3
| | | | | | | | the function did nothing if the key already exists (if the current value is a non-NULL pointer). _testcapi.run_in_subinterp() now correctly sets the new Python thread state of the current thread when a subinterpreter is created.
* Close #19741: tracemalloc_realloc() does not release the table lock anymoreVictor Stinner2013-12-041-10/+26
| | | | | | | | between tracemalloc_remove_trace() and tracemalloc_add_trace() to reduce the risk of race condition. tracemalloc_add_trace() cannot fail anymore in tracemalloc_realloc() when tracemalloc_realloc() resizes a memory block.
* Close #19757: Cleanup tracemalloc, moveVictor Stinner2013-12-041-98/+129
| | | | | | | | PyGILState_Ensure()/PyGILState_Release() calls to the raw wrappers to simplify the code. Rename also tracemalloc_log_alloc/log_free() to tracemalloc_add_trace/remove_trace().
* Closes #19831: Stop tracemalloc later at Python shutdown to be able to useVictor Stinner2013-12-011-67/+10
| | | | | | tracemalloc in objects destructor Replace atexit handler with an harcoded C function _PyTraceMalloc_Fini().
* Closes #19786: tracemalloc, remove the arbitrary limit of 100 framesVictor Stinner2013-11-271-21/+34
| | | | | | | | The limit is now 178,956,969 on 64 bit (it is greater on 32 bit because structures are smaller). Use int instead of Py_ssize_t to store the number of frames to have smaller traceback_t objects.
* Close #19798: replace "maximum" term with "peak" in get_traced_memory()Victor Stinner2013-11-271-12/+12
| | | | documentation. Use also the term "current" for the current size.
* tracemalloc: fix get_traced_memory() docstring for result typeVictor Stinner2013-11-261-1/+1
|
* Issue #18874: Fix typoVictor Stinner2013-11-261-1/+1
|
* Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1Victor Stinner2013-11-261-0/+1
|
* Issue #18874: tracemalloc: Comment the trace_t structureVictor Stinner2013-11-261-0/+4
|
* Issue #18874: tracemalloc: explain the purpose of get_traces.tracebacks in a ↵Victor Stinner2013-11-251-0/+2
| | | | comment
* Close #19762: Fix name of _get_traces() and _get_object_traceback() functionVictor Stinner2013-11-251-2/+2
| | | | name in their docstring. Patch written by Vajrasky Kok.
* Issue #19741: cleanup tracemalloc_realloc()Victor Stinner2013-11-241-8/+15
| | | | Explain that unhandled error case is very unlikely
* Issue #19741: tracemalloc: report tracemalloc_log_alloc() failure to the callerVictor Stinner2013-11-241-18/+29
| | | | for new allocations, but not when a memory block was already resized
* Issue #19741: fix tracemalloc_log_alloc(), handle _Py_HASHTABLE_SET() failureVictor Stinner2013-11-241-7/+16
|
* Issue #18874: Remove tracemalloc.set_traceback_limit()Victor Stinner2013-11-231-31/+18
| | | | tracemalloc.start() now has an option nframe parameter
* Issue #18874: Implement the PEP 454 (tracemalloc)Victor Stinner2013-11-231-0/+1407