René's URL Explorer Experiment


Title: PEP 445 – Add new APIs to customize Python memory allocators | peps.python.org

Open Graph Title: PEP 445 – Add new APIs to customize Python memory allocators | peps.python.org

Description: This PEP proposes new Application Programming Interfaces (API) to customize Python memory allocators. The only implementation required to conform to this PEP is CPython, but other implementations may choose to be compatible, or to re-use a similar scheme.

Open Graph Description: This PEP proposes new Application Programming Interfaces (API) to customize Python memory allocators. The only implementation required to conform to this PEP is CPython, but other implementations may choose to be compatible, or to re-use a similar scheme.

Opengraph URL: https://peps.python.org/pep-0445/

direct link

Domain: peps.python.org

color-schemelight dark
og:typewebsite
og:site_namePython Enhancement Proposals (PEPs)
og:imagehttps://peps.python.org/_static/og-image.png
og:image:altPython PEPs
og:image:width200
og:image:height200
theme-color#3776ab

Links:

Pythonhttps://www.python.org/
PEP Indexhttps://peps.python.org/
Python-Dev messagehttps://mail.python.org/pipermail/python-dev/2013-July/127222.html
Abstracthttps://peps.python.org/445#abstract
Rationalehttps://peps.python.org/445#rationale
Proposalhttps://peps.python.org/445#proposal
New Functions and Structureshttps://peps.python.org/445#new-functions-and-structures
Redesign Debug Checks on Memory Block Allocators as Hookshttps://peps.python.org/445#redesign-debug-checks-on-memory-block-allocators-as-hooks
Don’t call malloc() directly anymorehttps://peps.python.org/445#don-t-call-malloc-directly-anymore
Exampleshttps://peps.python.org/445#examples
Use case 1: Replace Memory Allocators, keep pymallochttps://peps.python.org/445#use-case-1-replace-memory-allocators-keep-pymalloc
Use case 2: Replace Memory Allocators, override pymallochttps://peps.python.org/445#use-case-2-replace-memory-allocators-override-pymalloc
Use case 3: Setup Hooks On Memory Block Allocatorshttps://peps.python.org/445#use-case-3-setup-hooks-on-memory-block-allocators
Performanceshttps://peps.python.org/445#performances
Rejected Alternativeshttps://peps.python.org/445#rejected-alternatives
More specific functions to get/set memory allocatorshttps://peps.python.org/445#more-specific-functions-to-get-set-memory-allocators
Make PyMem_Malloc() reuse PyMem_RawMalloc() by defaulthttps://peps.python.org/445#make-pymem-malloc-reuse-pymem-rawmalloc-by-default
Add a new PYDEBUGMALLOC environment variablehttps://peps.python.org/445#add-a-new-pydebugmalloc-environment-variable
Use macros to get customizable allocatorshttps://peps.python.org/445#use-macros-to-get-customizable-allocators
Pass the C filename and line numberhttps://peps.python.org/445#pass-the-c-filename-and-line-number
GIL-free PyMem_Malloc()https://peps.python.org/445#gil-free-pymem-malloc
Don’t add PyMem_RawMalloc()https://peps.python.org/445#don-t-add-pymem-rawmalloc
Use existing debug tools to analyze memory usehttps://peps.python.org/445#use-existing-debug-tools-to-analyze-memory-use
Add a msize() functionhttps://peps.python.org/445#add-a-msize-function
No context argumenthttps://peps.python.org/445#no-context-argument
External Librarieshttps://peps.python.org/445#external-libraries
Memory Allocatorshttps://peps.python.org/445#memory-allocators
Linkshttps://peps.python.org/445#links
Copyrighthttps://peps.python.org/445#copyright
Abstracthttps://peps.python.org/445#abstract
Rationalehttps://peps.python.org/445#rationale
Redesign Debug Checks on Memory Block Allocators as Hookshttps://peps.python.org/445#redesign-debug-checks-on-memory-block-allocators-as-hooks
Proposalhttps://peps.python.org/445#proposal
New Functions and Structureshttps://peps.python.org/445#new-functions-and-structures
Redesign Debug Checks on Memory Block Allocators as Hookshttps://peps.python.org/445#redesign-debug-checks-on-memory-block-allocators-as-hooks
Don’t call malloc() directly anymorehttps://peps.python.org/445#don-t-call-malloc-directly-anymore
Exampleshttps://peps.python.org/445#examples
Use case 1: Replace Memory Allocators, keep pymallochttps://peps.python.org/445#use-case-1-replace-memory-allocators-keep-pymalloc
Use case 2: Replace Memory Allocators, override pymallochttps://peps.python.org/445#use-case-2-replace-memory-allocators-override-pymalloc
Use case 3: Setup Hooks On Memory Block Allocatorshttps://peps.python.org/445#use-case-3-setup-hooks-on-memory-block-allocators
Performanceshttps://peps.python.org/445#performances
Python benchmarks suitehttp://hg.python.org/benchmarks
Rejected Alternativeshttps://peps.python.org/445#rejected-alternatives
More specific functions to get/set memory allocatorshttps://peps.python.org/445#more-specific-functions-to-get-set-memory-allocators
Make PyMem_Malloc() reuse PyMem_RawMalloc() by defaulthttps://peps.python.org/445#make-pymem-malloc-reuse-pymem-rawmalloc-by-default
Add a new PYDEBUGMALLOC environment variablehttps://peps.python.org/445#add-a-new-pydebugmalloc-environment-variable
PEP 432https://peps.python.org/pep-0432/
Use macros to get customizable allocatorshttps://peps.python.org/445#use-macros-to-get-customizable-allocators
Pass the C filename and line numberhttps://peps.python.org/445#pass-the-c-filename-and-line-number
GIL-free PyMem_Malloc()https://peps.python.org/445#gil-free-pymem-malloc
Don’t add PyMem_RawMalloc()https://peps.python.org/445#don-t-add-pymem-rawmalloc
Use existing debug tools to analyze memory usehttps://peps.python.org/445#use-existing-debug-tools-to-analyze-memory-use
Valgrindhttp://valgrind.org/
Purifyhttp://ibm.com/software/awdtools/purify/
Clang AddressSanitizerhttp://code.google.com/p/address-sanitizer/
failmallochttp://www.nongnu.org/failmalloc/
Pass the C filename and line numberhttps://peps.python.org/445#pass-the-c-filename-and-line-number
Add a msize() functionhttps://peps.python.org/445#add-a-msize-function
No context argumenthttps://peps.python.org/445#no-context-argument
External Librarieshttps://peps.python.org/445#external-libraries
CRYPTO_set_mem_functions()http://git.openssl.org/gitweb/?p=openssl.git;a=blob;f=crypto/mem.c;h=f7984fa958eb1edd6c61f6667f3f2b29753be662;hb=HEAD#l124
parserCreate()http://hg.python.org/cpython/file/cc27d50bd91a/Modules/expat/xmlparse.c#l724
zlib 1.2.8 Manualhttp://www.zlib.net/manual.html#Usage
bzip2 and libbzip2, version 1.0.5http://www.bzip.org/1.0.5/bzip2-manual-1.0.5.html
LZMA SDK - How to Usehttp://www.asawicki.info/news_1368_lzma_sdk_-_how_to_use.html
g_mem_set_vtable()http://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-mem-set-vtable
xmlGcMemSetup()http://xmlsoft.org/html/libxml-xmlmemory.html
Oracle Call Interface Programmer’s Guide, Release 2 (9.2)http://docs.oracle.com/cd/B10501_01/appdev.920/a96584/oci15re4.htm
GNU libc: Memory Allocation Hookshttp://www.gnu.org/software/libc/manual/html_node/Hooks-for-Malloc.html
Memory Allocatorshttps://peps.python.org/445#memory-allocators
jemallochttp://www.canonware.com/jemalloc/
gperftoolshttp://code.google.com/p/gperftools/
Low-fragmentation Heaphttp://msdn.microsoft.com/en-us/library/windows/desktop/aa366750%28v=vs.85%29.aspx
slab allocationhttp://en.wikipedia.org/wiki/Slab_allocation
Memory Slice APIhttps://developer.gnome.org/glib/unstable/glib-Memory-Slices.html
Linkshttps://peps.python.org/445#links
Issue #3329: Add new APIs to customize memory allocatorshttp://bugs.python.org/issue3329
Issue #13483: Use VirtualAlloc to allocate memory arenashttp://bugs.python.org/issue13483
Issue #16742: PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn’t thread safehttp://bugs.python.org/issue16742
Issue #18203: Replace calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc()http://bugs.python.org/issue18203
Issue #18227: Use Python memory allocators in external libraries like zlib or OpenSSLhttp://bugs.python.org/issue18227
pytracemallochttps://pypi.python.org/pypi/pytracemalloc
Meliae: Python Memory Usage Analyzerhttps://pypi.python.org/pypi/meliae
Guppy-PE: umbrella package combining Heapy and GSLhttp://guppy-pe.sourceforge.net/
PySizer (developed for Python 2.4)http://pysizer.8325.org/
Copyrighthttps://peps.python.org/445#copyright
Abstracthttps://peps.python.org/445#abstract
Rationalehttps://peps.python.org/445#rationale
Proposalhttps://peps.python.org/445#proposal
New Functions and Structureshttps://peps.python.org/445#new-functions-and-structures
Redesign Debug Checks on Memory Block Allocators as Hookshttps://peps.python.org/445#redesign-debug-checks-on-memory-block-allocators-as-hooks
Don’t call malloc() directly anymorehttps://peps.python.org/445#don-t-call-malloc-directly-anymore
Exampleshttps://peps.python.org/445#examples
Use case 1: Replace Memory Allocators, keep pymallochttps://peps.python.org/445#use-case-1-replace-memory-allocators-keep-pymalloc
Use case 2: Replace Memory Allocators, override pymallochttps://peps.python.org/445#use-case-2-replace-memory-allocators-override-pymalloc
Use case 3: Setup Hooks On Memory Block Allocatorshttps://peps.python.org/445#use-case-3-setup-hooks-on-memory-block-allocators
Performanceshttps://peps.python.org/445#performances
Rejected Alternativeshttps://peps.python.org/445#rejected-alternatives
More specific functions to get/set memory allocatorshttps://peps.python.org/445#more-specific-functions-to-get-set-memory-allocators
Make PyMem_Malloc() reuse PyMem_RawMalloc() by defaulthttps://peps.python.org/445#make-pymem-malloc-reuse-pymem-rawmalloc-by-default
Add a new PYDEBUGMALLOC environment variablehttps://peps.python.org/445#add-a-new-pydebugmalloc-environment-variable
Use macros to get customizable allocatorshttps://peps.python.org/445#use-macros-to-get-customizable-allocators
Pass the C filename and line numberhttps://peps.python.org/445#pass-the-c-filename-and-line-number
GIL-free PyMem_Malloc()https://peps.python.org/445#gil-free-pymem-malloc
Don’t add PyMem_RawMalloc()https://peps.python.org/445#don-t-add-pymem-rawmalloc
Use existing debug tools to analyze memory usehttps://peps.python.org/445#use-existing-debug-tools-to-analyze-memory-use
Add a msize() functionhttps://peps.python.org/445#add-a-msize-function
No context argumenthttps://peps.python.org/445#no-context-argument
External Librarieshttps://peps.python.org/445#external-libraries
Memory Allocatorshttps://peps.python.org/445#memory-allocators
Linkshttps://peps.python.org/445#links
Copyrighthttps://peps.python.org/445#copyright
Page Source (GitHub)https://github.com/python/peps/blob/main/peps/pep-0445.rst?plain=1
https://github.com/python/peps/blob/main/peps/pep-0445.rsthttps://github.com/python/peps/blob/main/peps/pep-0445.rst
2025-02-01 08:59:27 UTChttps://github.com/python/peps/commits/main/peps/pep-0445.rst

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.