summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/memory.rst
Commit message (Collapse)AuthorAgeFilesLines
* fix minor bug in pymalloc. (GH-335) (GH-476)Mariatta2017-03-061-1/+1
| | | (cherry picked from commit f669ffff6010a94f2d441200e0fd73e9dea2883e)
* PyMem_Malloc() now uses the fast pymalloc allocatorVictor Stinner2016-04-221-23/+37
| | | | | | | Issue #26249: PyMem_Malloc() allocator family now uses the pymalloc allocator rather than system malloc(). Applications calling PyMem_Malloc() without holding the GIL can now crash: use PYTHONMALLOC=debug environment variable to validate the usage of memory allocators in your application.
* Fix typo in doc: avoid the french "& cie" :-)Victor Stinner2016-03-231-1/+1
|
* Doc: fix typos, patch written by Stefan BehnelVictor Stinner2016-03-181-1/+1
|
* Enhance documentation on malloc debug hooksVictor Stinner2016-03-181-3/+6
| | | | Issue #26564, #26516, #26563.
* On memory error, dump the memory block tracebackVictor Stinner2016-03-151-0/+7
| | | | | | Issue #26564: _PyObject_DebugDumpAddress() now dumps the traceback where a memory block was allocated on memory block. Use the tracemalloc module to get the traceback.
* Check the GIL in PyObject_Malloc()Victor Stinner2016-03-141-3/+6
| | | | | Issue #26558: The debug hook of PyObject_Malloc() now checks that the GIL is held when the function is called.
* Add PYTHONMALLOC env varVictor Stinner2016-03-141-12/+26
| | | | | | | | | | | | | Issue #26516: * Add PYTHONMALLOC environment variable to set the Python memory allocators and/or install debug hooks. * PyMem_SetupDebugHooks() can now also be used on Python compiled in release mode. * The PYTHONMALLOCSTATS environment variable can now also be used on Python compiled in release mode. It now has no effect if set to an empty string. * In debug mode, debug hooks are now also installed on Python memory allocators when Python is configured without pymalloc.
* Issue #26516: Enhance Python mem allocators docVictor Stinner2016-03-091-43/+77
| | | | | | | * add link to PYTHONMALLOCSTATS env var * add parameters to PyMem macros like PyMem_MALLOC() * fix PyMem_SetupDebugHooks(): add Calloc functions * add some newlines for readability
* Merge: #23957: fix typo.R David Murray2015-04-141-1/+1
|\
| * #23957: fix typo.R David Murray2015-04-141-1/+1
| |
* | Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" toVictor Stinner2014-06-021-4/+6
| | | | | | | | | | make sure that the code using it will be adapted for the new "calloc" field (instead of crashing).
* | Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),Victor Stinner2014-05-021-4/+32
|/ | | | | | 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 #18874: _PyObject_Malloc/Realloc/Free() now falls back onVictor Stinner2013-10-101-2/+2
| | | | | | _PyMem_RawMalloc/Realloc/Free, instead of _PyMem_Malloc/Realloc/Free. So it becomes possible to use the fast pymalloc allocator for the PYMEM_DOMAIN_MEM domain (PyMem_Malloc/Realloc/Free functions).
* Issue #3329: Implement the PEP 445Victor Stinner2013-07-071-1/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add new enum: * PyMemAllocatorDomain Add new structures: * PyMemAllocator * PyObjectArenaAllocator Add new functions: * PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree() * PyMem_GetAllocator(), PyMem_SetAllocator() * PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator() * PyMem_SetupDebugHooks() Changes: * PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead of calling PyObject_Malloc()/PyObject_Realloc() in debug mode. * PyObject_Malloc()/PyObject_Realloc() now falls back to PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes. * Redesign debug checks on memory block allocators as hooks, instead of using C macros
* Revert changeset 6661a8154eb3: Issue #3329: Add new APIs to customize memory ↵Victor Stinner2013-06-151-120/+1
| | | | | | allocators The new API require more discussion.
* Issue #3329: Add new APIs to customize memory allocatorsVictor Stinner2013-06-141-1/+120
| | | | | | | | | | | | | | | | | | | | * Add a new PyMemAllocators structure * New functions: - PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree(): GIL-free memory allocator functions - PyMem_GetRawAllocators(), PyMem_SetRawAllocators() - PyMem_GetAllocators(), PyMem_SetAllocators() - PyMem_SetupDebugHooks() - _PyObject_GetArenaAllocators(), _PyObject_SetArenaAllocators() * Add unit test for PyMem_Malloc(0) and PyObject_Malloc(0) * Add unit test for new get/set allocators functions * PyObject_Malloc() now falls back on PyMem_Malloc() instead of malloc() if size is bigger than SMALL_REQUEST_THRESHOLD, and PyObject_Realloc() falls back on PyMem_Realloc() instead of realloc() * PyMem_Malloc() and PyMem_Realloc() now always call malloc() and realloc(), instead of calling PyObject_Malloc() and PyObject_Realloc() in debug mode
* Clean up references to the no longer existing PyString_ APIs in our docs.Gregory P. Smith2013-03-221-3/+3
|
* fix docs for c-api memory functionsAndrew Svetlov2012-08-091-3/+3
|
* Migrate to Sphinx 1.0 C language constructs.Georg Brandl2010-10-061-24/+24
|
* Merged revisions 65182 via svnmerge fromGeorg Brandl2008-07-231-1/+3
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65182 | gregory.p.smith | 2008-07-22 06:46:32 +0200 (Tue, 22 Jul 2008) | 7 lines Issue #2620: Overflow checking when allocating or reallocating memory was not always being done properly in some python types and extension modules. PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have all been updated to perform better checks and places in the code that would previously leak memory on the error path when such an allocation failed have been fixed. ........
* Move the 3k reST doc tree in place.Georg Brandl2007-08-151-0/+207